From dc13952417e5c918de9bd51f504db7a289ddabed Mon Sep 17 00:00:00 2001 From: uema2 Date: Sun, 1 Jun 2003 04:44:45 +0000 Subject: * wince/string_wce.c: add strpbrk() for hpcpro support. * wince/setup.mak: add hpcpro(CE2.11) & armv4t(CE.NET) support. * wince/resource.rb: ditto. * wince/Makefile.sub: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- wince/string_wce.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'wince/string_wce.c') diff --git a/wince/string_wce.c b/wince/string_wce.c index 2a5514913d..a1ee075077 100644 --- a/wince/string_wce.c +++ b/wince/string_wce.c @@ -66,4 +66,24 @@ int stricmp( const char *s1, const char *s2 ) return n; } + +char *strpbrk(const char *str, const char *cs) +{ + wchar_t *wstr, *wcs, *w; + char *s = NULL; + + wstr = wce_mbtowc(str); + wcs = wce_mbtowc(cs); + + w = wcspbrk(wstr, wcs); + + if( w!=NULL ) + s = str + (wcs-wstr)/sizeof(wchar_t); + + free(wstr); + free(wcs); + + return s; +} + #endif -- cgit v1.2.3