Changeset 125 for Include/Classes
- Timestamp:
- Mar 2, 2007, 2:57:09 PM (18 years ago)
- Location:
- Include/Classes/System
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/IO/Path.ab
r62 r125 1 1 Class Path 2 2 Public 3 Static AltDirectorySeparatorChar = &H2F As Byte'/4 Static DirectorySeparatorChar = &H5C As Byte'\5 Static PathSeparator = &H3B As Byte';6 Static VolumeSeparatorChar = &H3A As Byte':3 Static AltDirectorySeparatorChar = &H2F As Char '/ 4 Static DirectorySeparatorChar = &H5C As Char '\ 5 Static PathSeparator = &H3B As Char '; 6 Static VolumeSeparatorChar = &H3A As Char ': 7 7 8 8 Static Function GetFileName(path As String) As String … … 50 50 End Function 51 51 52 Static Function HasExtension(ByRef path As String) As B OOL52 Static Function HasExtension(ByRef path As String) As Boolean 53 53 If GetExtension(path) <> "" Then 54 54 Return _System_TRUE … … 59 59 60 60 Static Function GetTempFileName() As String 61 ' TODO: 実装 61 Dim tempPathSize = __GetTempPath(0, 0) 62 Dim tempPath = _System_malloc(SizeOf (TCHAR) * tempPathSize) As PTSTR 63 If tempPath = 0 Then 64 ' Throw OutOfMemoryException 65 Debug 66 End If 67 If __GetTempPath(tempPathSize, tempPath) > tempPathSize Then 68 ' Throw IOException? 69 Debug 70 End If 71 72 Dim tempFileName[ELM(MAX_PATH)] As TCHAR 73 __GetTempFileName(tempPath, "ABT", 0, tempFileName) 74 free(tempPath) 75 Return tempFileName 62 76 End Function 63 77 … … 148 162 Return GetTempPath(nBufferLength, lpBuffer) 149 163 End Function 164 165 Function __GetTempFileName(pPathName As PCSTR, pPrefixString As PCSTR, uUnique As DWord, pTempFileName As PSTR) As DWord 166 Return GetTempFileName(pPathName, pPrefixString, uUnique, pTempFileName) 167 End Function -
Include/Classes/System/String.ab
r123 r125 12 12 String() 13 13 Assign(initStr) 14 End Sub 15 16 Sub String(initStr As *Char, length As Long) 17 String() 18 Assign(initStr, length) 14 19 End Sub 15 20 … … 454 459 455 460 Sub ToLower() 456 CharLower(Chars) 461 Dim i As Long 462 For i = 0 To m_Length 463 Chars[i] = _System_ASCII_ToLower(Chars[i]) 464 Next 457 465 End Sub 458 466 459 467 Sub ToUpper() 460 CharUpper(Chars) 468 Dim i As Long 469 For i = 0 To m_Length 470 Chars[i] = _System_ASCII_ToUpper(Chars[i]) 471 Next 461 472 End Sub 462 473
Note:
See TracChangeset
for help on using the changeset viewer.