Ignore:
Timestamp:
Jun 12, 2007, 7:24:38 PM (17 years ago)
Author:
イグトランス (egtra)
Message:

StringBuilderを追加。String不変へ。共通の文字列操作関数をActiveBasic.Strings内に配置(設計に検討の余地あり)。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/Classes/System/DateTime.ab

    r268 r272  
    178178    End Function
    179179
    180     Static Function ToDay() As DateTime
     180    Static Function Today() As DateTime
    181181        Dim time As SYSTEMTIME
    182182        GetLocalTime(time)
     
    292292        Dim dateFormatSize = GetDateFormat(LOCALE_USER_DEFAULT, 0, time, NULL, NULL, 0)
    293293        Dim timeFormatSize = GetTimeFormat(LOCALE_USER_DEFAULT, 0, time, NULL, NULL, 0)
    294         Dim dateTimeFormats = malloc(dateFormatSize + timeFormatSize) As PTSTR
     294        Dim strLength = dateFormatSize + timeFormatSize
     295        Dim dateTimeFormats = GC_malloc_atomic(SizeOf (TCHAR) * (strLength)) As PTSTR
    295296        GetDateFormat(LOCALE_USER_DEFAULT, 0, time, NULL, dateTimeFormats, dateFormatSize)
    296297        dateTimeFormats[dateFormatSize - 1] = Asc(" ")
    297298        GetTimeFormat(LOCALE_USER_DEFAULT, 0, time, NULL, dateTimeFormats + dateFormatSize, timeFormatSize)
    298 
    299         Return New String(dateTimeFormats)
     299'Debug
     300        Return New String(dateTimeFormats, strLength)
    300301    End Function
    301302
Note: See TracChangeset for help on using the changeset viewer.