Ignore:
Timestamp:
Apr 4, 2007, 6:53:48 PM (18 years ago)
Author:
イグトランス (egtra)
Message:

GCHandleの追加、String.Compareなどの追加、gc.sbpの修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/basic/function.sbp

    r192 r203  
    11691169End Function
    11701170
    1171 
    11721171Function _System_StrCmp(s1 As PCSTR, s2 As PCSTR) As Long
    11731172    Dim i = 0 As SIZE_T
     
    11921191End Function
    11931192
     1193Function _System_StrCmpN(s1 As PCSTR, s2 As PCSTR, size As SIZE_T) As Long
     1194    Dim i = 0 As SIZE_T
     1195    For i = 0 To ELM(size)
     1196        _System_StrCmp = s1[i] - s2[i]
     1197        If _System_StrCmp <> 0 Then
     1198            Exit Function
     1199        End If
     1200    Next
     1201End Function
     1202
     1203Function _System_StrCmpN(s1 As PCWSTR, s2 As PCWSTR, size As SIZE_T) As Long
     1204    Dim i = 0 As SIZE_T
     1205    For i = 0 To ELM(size)
     1206        _System_StrCmp = s1[i] - s2[i]
     1207        If _System_StrCmp <> 0 Then
     1208            Exit Function
     1209        End If
     1210    Next
     1211End Function
     1212
     1213Function _System_MemChr(s As PCSTR, c As CHAR, size As SIZE_T) As PCSTR
     1214    Dim i As SIZE_T
     1215    For i = 0 To ELM(size)
     1216        If s[i] = c Then
     1217            Return VarPtr(s[i])
     1218        End If
     1219    Next
     1220    Return 0
     1221End Function
     1222
     1223Function _System_MemChr(s As PCWSTR, c As WCHAR, size As SIZE_T) As PCWSTR
     1224    Dim i As SIZE_T
     1225    For i = 0 To ELM(size)
     1226        If s[i] = c Then
     1227            Return VarPtr(s[i])
     1228        End If
     1229    Next
     1230    Return 0
     1231End Function
     1232
     1233Function _System_MemPBrk(str As PCSTR, cStr As SIZE_T, Chars As PCSTR, cChars As SIZE_T) As PCSTR
     1234    Dim i As SIZE_T
     1235    For i = 0 To ELM(cStr)
     1236        If _System_MemChr(Chars, str[i], cChars) Then
     1237            Return VarPtr(str[i])
     1238        End If
     1239    Next
     1240    Return 0
     1241End Function
     1242
     1243Function _System_MemPBrk(str As PCWSTR, cStr As SIZE_T, Chars As PCWSTR, cChars As SIZE_T) As PCWSTR
     1244    Dim i As SIZE_T
     1245    For i = 0 To ELM(cStr)
     1246        If _System_MemChr(Chars, str[i], cChars) Then
     1247            Return VarPtr(str[i])
     1248        End If
     1249    Next
     1250    Return 0
     1251End Function
     1252
    11941253Function _System_GetHashFromWordArray(p As *Word, n As SIZE_T) As Long
    11951254    Dim hash = 0 As DWord
Note: See TracChangeset for help on using the changeset viewer.