Functions.MemAtSpecial 方法 |
命名空间: XSharp.RT
FUNCTION MemAtSpecial( ptrBuffer AS IntPtr, dwCount AS DWORD ) AS DWORD
public static uint MemAtSpecial( IntPtr ptrBuffer, uint dwCount )
1FUNCTION Start() 2 LOCAL s := "AB" + _Chr(10) + "CD" + _Chr(7) + ; 3 "EF" + _Chr(13) + "GH" AS STRING 4 LOCAL wAt AS DWORD 5 DO WHILE SLen(s) > 0 6 wAt := MemAtSpecial(Ptr(_CAST, s), SLen(s)) 7 IF wAt > 0 8 ? "检测到 ASCII 代码为:",; 9 Asc(Substr3(s, wAt, 1)), "的特殊字符" 10 // 查询字符串的其余部分 11 // (从 wAt+1 开始) 12 s := Substr(s, wAt+1) 13 ELSE 14 s := "" 15 ENDIF 16 ENDDO