Changeset 671
- Timestamp:
- Jan 5, 2009, 1:08:40 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/ablib/src/system/string.sbp
r654 r671 2 2 '文字列変数の操作用 3 3 4 /*! 5 @brief Stringが内部で保持しているポインタを返す。 6 @param[in] s 文字列。 7 @return sの内部バッファへのポインタ、ただしsがNothingならNULL。 8 */ 4 9 Function StrPtr(s As String) As *Char 5 10 If Not ActiveBasic.IsNothing(s) Then … … 7 12 End If 8 13 End Function 9 'StringBuilder版はClasses/System/Text/StringBuilder.abに定義されている 10 11 Function ZeroString(length As Long) As System.Text.StringBuilder 12 ZeroString = New System.Text.StringBuilder 13 ZeroString.Length = length 14 End Function 14 'StringBuilder版はClasses/System/Text/StringBuilder.abに定義されている。 15 16 /*! 17 @brief 指定した長さの空文字(\0)を持つ文字列を作成する。 18 @param[in] length 長さ 19 @return Legnth = lengthとなっている文字列。 20 */ 21 Function ZeroString(length As Long) As String 22 ZeroString = New String(0 As Char, length) 23 End Function 24 15 25 16 26 Function MakeStr(psz As PSTR) As String … … 40 50 Dim lenMBS = WideCharToMultiByte(CP_ACP, 0, wcsSrc, (len As DWord) As Long, 0, 0, 0, 0) 41 51 mbsDst = _System_AllocForConvertedString(SizeOf (CHAR) * lenMBS) As PSTR 42 GetMBStr = WideCharToMultiByte(CP_ACP, 0, wcsSrc, ( wcsSrcAs DWord) As Long, mbsDst, lenMBS, 0, 0) As SIZE_T52 GetMBStr = WideCharToMultiByte(CP_ACP, 0, wcsSrc, (len As DWord) As Long, mbsDst, lenMBS, 0, 0) As SIZE_T 43 53 End Function 44 54
Note:
See TracChangeset
for help on using the changeset viewer.