mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
9f6f32c737
commit
dc13952417
5 changed files with 57 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue