While SysUtils.StrScan() takes PWideChar开发者_Go百科 const as the parameter, is there a StrScan() like built-in function for string/Unicodestring type?
Thanks in advance.
Plain old Pos
will work well enough for most cases. The second parameter will simply be a one-character string
instead of a Char
.
If the string you're searching through will not have embedded null characters, then you can also use StrScan
directly; just type-cast the string parameter to PChar
. StrScan
will stop searching when it reaches the null character.
精彩评论