Changeset 52554 in vbox
- Timestamp:
- Sep 1, 2014 4:00:05 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 95815
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/string.h
r52546 r52554 514 514 } 515 515 516 Utf8Str(CBSTR that, size_t a_c chSize = RTSTR_MAX)517 { 518 copyFrom(that, a_c chSize);516 Utf8Str(CBSTR that, size_t a_cwcSize = RTSTR_MAX) 517 { 518 copyFrom(that, a_cwcSize); 519 519 } 520 520 … … 718 718 protected: 719 719 720 void copyFrom(CBSTR a_pbstr, size_t a_c chSize= RTSTR_MAX);720 void copyFrom(CBSTR a_pbstr, size_t a_cwcMax = RTSTR_MAX); 721 721 HRESULT copyFromEx(CBSTR a_pbstr); 722 722 HRESULT copyFromExNComRC(const char *a_pcszSrc, size_t a_offSrc, size_t a_cchSrc); -
trunk/src/VBox/Main/glue/string.cpp
r52546 r52554 179 179 * @param a_pbstr The source string. The caller guarantees that this 180 180 * is valid UTF-16. 181 * @param a_c bSizeThe number of characters to be copied. If set to RTSTR_MAX,181 * @param a_cwcMax The number of characters to be copied. If set to RTSTR_MAX, 182 182 * the entire string will be copied. 183 183 * 184 184 * @sa RTCString::copyFromN 185 185 */ 186 void Utf8Str::copyFrom(CBSTR a_pbstr, size_t a_c chSize)186 void Utf8Str::copyFrom(CBSTR a_pbstr, size_t a_cwcMax) 187 187 { 188 188 if (a_pbstr && *a_pbstr) 189 189 { 190 190 int vrc = RTUtf16ToUtf8Ex((PCRTUTF16)a_pbstr, 191 a_c chSize, // size_t cwcString: translate entire string191 a_cwcMax, // size_t cwcString: translate entire string 192 192 &m_psz, // char **ppsz: output buffer 193 193 0, // size_t cch: if 0, func allocates buffer in *ppsz
Note:
See TracChangeset
for help on using the changeset viewer.