Changeset 385 for trunk/Include/system/string.sbp
- Timestamp:
- Nov 20, 2007, 12:04:07 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/system/string.sbp
r383 r385 9 9 10 10 Function StrPtr(s As String) As *StrChar 11 StrPtr = s.StrPtr 11 If ActiveBasic.IsNothing(s) Then 12 StrPtr = s.StrPtr 13 End If 12 14 End Function 13 15 'StringBuilder版はClasses/System/Text/StringBuilder.abに定義されている … … 39 41 Function GetStr(psz As PSTR, len As SIZE_T, ByRef wcs As PWSTR) As SIZE_T 40 42 If psz = 0 Then Return 0 41 Dim lenWCS = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, lenAs Long, 0, 0)43 Dim lenWCS = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, (len As DWord) As Long, 0, 0) 42 44 wcs = _System_AllocForConvertedString(SizeOf (WCHAR) * (lenWCS + 1)) As PWSTR 43 GetStr = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, lenAs Long, wcs, lenWCS)45 GetStr = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, (len As DWord) As Long, wcs, lenWCS) 44 46 wcs[GetStr] = 0 45 47 End Function … … 73 75 Function GetStr(psz As PWSTR, len As SIZE_T, ByRef mbs As PSTR) As SIZE_T 74 76 If psz = 0 Then Return 0 75 Dim lenMBS = WideCharToMultiByte(CP_THREAD_ACP, 0, psz, lenAs Long, 0, 0, 0, 0)77 Dim lenMBS = WideCharToMultiByte(CP_THREAD_ACP, 0, psz, (len As DWord) As Long, 0, 0, 0, 0) 76 78 mbs = _System_AllocForConvertedString(SizeOf (SByte) * (lenMBS + 1)) As PSTR 77 GetStr = WideCharToMultiByte(CP_THREAD_ACP, 0, psz, lenAs Long, mbs, lenMBS, 0, 0) As SIZE_T79 GetStr = WideCharToMultiByte(CP_THREAD_ACP, 0, psz, (len As DWord) As Long, mbs, lenMBS, 0, 0) As SIZE_T 78 80 mbs[GetStr] = 0 79 81 End Function
Note:
See TracChangeset
for help on using the changeset viewer.