Changeset 383 for trunk/Include/Classes/ActiveBasic/Strings/Strings.ab
- Timestamp:
- Nov 17, 2007, 9:34:36 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/Classes/ActiveBasic/Strings/Strings.ab
r370 r383 11 11 12 12 Sub ChrFill(p As PWSTR, n As SIZE_T, c As WCHAR) 13 Dim i As SIZE_T14 For i = 0 To ELM(n)13 Dim i = 0 As SIZE_T 14 While i <> n 15 15 p[i] = c 16 Next 16 i++ 17 Wend 17 18 End Sub 18 19 19 20 Sub ChrFill(p As PSTR, n As SIZE_T, c As SByte) 20 Dim i As SIZE_T21 For i = 0 To ELM(n)21 Dim i = 0 As SIZE_T 22 While i <> n 22 23 p[i] = c 23 Next 24 i++ 25 Wend 24 26 End Sub 25 27 … … 105 107 106 108 Function ChrPBrk(str As PCWSTR, cStr As SIZE_T, chars As PCWSTR, cChars As SIZE_T) As SIZE_T 107 Dim i As SIZE_T108 For i = 0 To ELM(cStr)109 Dim i = 0 As SIZE_T 110 While i <> cStr 109 111 If ChrFind(chars, cChars, str[i]) <> -1 Then 110 112 Return i 111 113 End If 112 Next 114 i++ 115 Wend 113 116 Return -1 As SIZE_T 114 117 End Function 115 118 116 119 Function ChrPBrk(str As PCSTR, cStr As SIZE_T, Chars As PCSTR, cChars As SIZE_T) As SIZE_T 117 Dim i As SIZE_T118 For i = 0 To ELM(cStr)120 Dim i = 0 As SIZE_T 121 While i <> cStr 119 122 If ChrFind(Chars, cChars, str[i]) <> -1 Then 120 123 Return i 121 124 End If 122 Next 125 i++ 126 Wend 123 127 Return -1 As SIZE_T 124 128 End Function 125 129 126 130 Function ChrFind(s As PCWSTR, size As SIZE_T, c As WCHAR) As SIZE_T 127 Dim i As SIZE_T128 For i = 0 To ELM(size)131 Dim i = 0 As SIZE_T 132 While i <> size 129 133 If s[i] = c Then 130 134 Return i 131 135 End If 132 Next 136 i++ 137 Wend 133 138 Return -1 As SIZE_T 134 139 End Function 135 140 136 141 Function ChrFind(s As PCSTR, size As SIZE_T, c As CHAR) As SIZE_T 137 Dim i As SIZE_T138 For i = 0 To ELM(size)142 Dim i = 0 As SIZE_T 143 While i <> size 139 144 If s[i] = c Then 140 145 Return i 141 146 End If 142 Next 147 i++ 148 Wend 143 149 Return -1 As SIZE_T 144 150 End Function … … 210 216 Loop 211 217 End Function 218 212 219 End Namespace 'Detail 213 220
Note:
See TracChangeset
for help on using the changeset viewer.