diff options
author | uema2 <uema2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-06-01 04:44:45 +0000 |
---|---|---|
committer | uema2 <uema2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-06-01 04:44:45 +0000 |
commit | dc13952417e5c918de9bd51f504db7a289ddabed (patch) | |
tree | fd6ab49ddda8377a46ac13f04417e773785e3add /wince/string_wce.c | |
parent | 9f6f32c7378fd933af37ea1ddedca133bf4431e9 (diff) |
* 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
Diffstat (limited to 'wince/string_wce.c')
-rw-r--r-- | wince/string_wce.c | 20 |
1 files changed, 20 insertions, 0 deletions
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 |