po: Update Japanese translation.
[wine.git] / dlls / msvcp60 / string.c
blob8937dd35873cc15cfe4218e376f41b94cb1fcda8
1 /*
2 * Copyright 2012 Piotr Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #include <stdarg.h>
22 #include "msvcp.h"
23 #include "stdio.h"
25 #include "windef.h"
26 #include "winbase.h"
27 #include "wine/debug.h"
28 WINE_DEFAULT_DEBUG_CHANNEL(msvcp);
30 #define FROZEN 255
32 /* _String_iterator<char> and _String_const_iterator<char> class */
33 typedef struct {
34 char *ptr;
35 } String_reverse_iterator_char;
37 typedef struct {
38 wchar_t *ptr;
39 } String_reverse_iterator_wchar;
41 /* allocator class */
42 typedef struct {
43 char empty_struct;
44 } allocator;
46 /* ?_Xran@std@@YAXXZ */
47 void __cdecl _Xran(void)
49 static const char msg[] = "invalid string position";
51 TRACE("\n");
52 throw_exception(EXCEPTION_OUT_OF_RANGE, msg);
55 /* ?_Xlen@std@@YAXXZ */
56 void __cdecl _Xlen(void)
58 static const char msg[] = "string too long";
60 TRACE("\n");
61 throw_exception(EXCEPTION_LENGTH_ERROR, msg);
64 /* ?compare@?$char_traits@D@std@@SAHPBD0I@Z */
65 /* ?compare@?$char_traits@D@std@@SAHPEBD0_K@Z */
66 int CDECL MSVCP_char_traits_char_compare(
67 const char *s1, const char *s2, size_t count)
69 int ret = memcmp(s1, s2, count);
70 return (ret>0 ? 1 : (ret<0 ? -1 : 0));
73 /* ?length@?$char_traits@D@std@@SAIPBD@Z */
74 /* ?length@?$char_traits@D@std@@SA_KPEBD@Z */
75 size_t CDECL MSVCP_char_traits_char_length(const char *str)
77 return strlen(str);
80 /* ?_Copy_s@?$char_traits@D@std@@SAPADPADIPBDI@Z */
81 /* ?_Copy_s@?$char_traits@D@std@@SAPEADPEAD_KPEBD1@Z */
82 char* CDECL MSVCP_char_traits_char__Copy_s(char *dest,
83 size_t size, const char *src, size_t count)
85 if(!dest || !src || size<count) {
86 if(dest && size)
87 dest[0] = '\0';
88 _invalid_parameter(NULL, NULL, NULL, 0, 0);
89 return dest;
92 return memcpy(dest, src, count);
95 /* ?copy@?$char_traits@D@std@@SAPADPADPBDI@Z */
96 /* ?copy@?$char_traits@D@std@@SAPEADPEADPEBD_K@Z */
97 char* CDECL MSVCP_char_traits_char_copy(
98 char *dest, const char *src, size_t count)
100 return MSVCP_char_traits_char__Copy_s(dest, count, src, count);
103 /* ?find@?$char_traits@D@std@@SAPBDPBDIABD@Z */
104 /* ?find@?$char_traits@D@std@@SAPEBDPEBD_KAEBD@Z */
105 const char * CDECL MSVCP_char_traits_char_find(
106 const char *str, size_t range, const char *c)
108 return memchr(str, *c, range);
111 /* ?_Move_s@?$char_traits@D@std@@SAPADPADIPBDI@Z */
112 /* ?_Move_s@?$char_traits@D@std@@SAPEADPEAD_KPEBD1@Z */
113 char* CDECL MSVCP_char_traits_char__Move_s(char *dest,
114 size_t size, const char *src, size_t count)
116 if(!dest || !src || size<count) {
117 if(dest && size)
118 dest[0] = '\0';
119 _invalid_parameter(NULL, NULL, NULL, 0, 0);
120 return dest;
123 return memmove(dest, src, count);
126 /* ?move@?$char_traits@D@std@@SAPADPADPBDI@Z */
127 /* ?move@?$char_traits@D@std@@SAPEADPEADPEBD_K@Z */
128 char* CDECL MSVCP_char_traits_char_move(
129 char *dest, const char *src, size_t count)
131 return MSVCP_char_traits_char__Move_s(dest, count, src, count);
134 /* ?assign@?$char_traits@D@std@@SAPADPADID@Z */
135 /* ?assign@?$char_traits@D@std@@SAPEADPEAD_KD@Z */
136 char* CDECL MSVCP_char_traits_char_assignn(char *str, size_t num, char c)
138 return memset(str, c, num);
141 /* ?compare@?$char_traits@_W@std@@SAHPB_W0I@Z */
142 /* ?compare@?$char_traits@_W@std@@SAHPEB_W0_K@Z */
143 int CDECL MSVCP_char_traits_wchar_compare(const wchar_t *s1,
144 const wchar_t *s2, size_t count)
146 size_t i;
147 int ret = 0;
149 for (i = 0; i < count && !ret; i++) ret = s1[i] - s2[i];
150 return (ret>0 ? 1 : (ret<0 ? -1 : 0));
153 /* ?length@?$char_traits@_W@std@@SAIPB_W@Z */
154 /* ?length@?$char_traits@_W@std@@SA_KPEB_W@Z */
155 size_t CDECL MSVCP_char_traits_wchar_length(const wchar_t *str)
157 return wcslen((WCHAR*)str);
160 /* ?_Copy_s@?$char_traits@_W@std@@SAPA_WPA_WIPB_WI@Z */
161 /* ?_Copy_s@?$char_traits@_W@std@@SAPEA_WPEA_W_KPEB_W1@Z */
162 wchar_t* CDECL MSVCP_char_traits_wchar__Copy_s(wchar_t *dest,
163 size_t size, const wchar_t *src, size_t count)
165 if(!dest || !src || size<count) {
166 if(dest && size)
167 dest[0] = '\0';
168 _invalid_parameter(NULL, NULL, NULL, 0, 0);
169 return dest;
172 return memcpy(dest, src, count * sizeof(wchar_t));
175 /* ?copy@?$char_traits@_W@std@@SAPA_WPA_WPB_WI@Z */
176 /* ?copy@?$char_traits@_W@std@@SAPEA_WPEA_WPEB_W_K@Z */
177 wchar_t* CDECL MSVCP_char_traits_wchar_copy(wchar_t *dest,
178 const wchar_t *src, size_t count)
180 return MSVCP_char_traits_wchar__Copy_s(dest, count, src, count);
183 /* ?find@?$char_traits@_W@std@@SAPB_WPB_WIAB_W@Z */
184 /* ?find@?$char_traits@_W@std@@SAPEB_WPEB_W_KAEB_W@Z */
185 const wchar_t* CDECL MSVCP_char_traits_wchar_find(
186 const wchar_t *str, size_t range, const wchar_t *c)
188 size_t i=0;
190 for(i=0; i<range; i++)
191 if(str[i] == *c)
192 return str+i;
194 return NULL;
197 /* ?_Move_s@?$char_traits@_W@std@@SAPA_WPA_WIPB_WI@Z */
198 /* ?_Move_s@?$char_traits@_W@std@@SAPEA_WPEA_W_KPEB_W1@Z */
199 wchar_t* CDECL MSVCP_char_traits_wchar__Move_s(wchar_t *dest,
200 size_t size, const wchar_t *src, size_t count)
202 if(!dest || !src || size<count) {
203 if(dest && size)
204 dest[0] = '\0';
205 _invalid_parameter(NULL, NULL, NULL, 0, 0);
206 return dest;
209 return memmove(dest, src, count * sizeof(WCHAR));
212 /* ?move@?$char_traits@_W@std@@SAPA_WPA_WPB_WI@Z */
213 /* ?move@?$char_traits@_W@std@@SAPEA_WPEA_WPEB_W_K@Z */
214 wchar_t* CDECL MSVCP_char_traits_wchar_move(wchar_t *dest,
215 const wchar_t *src, size_t count)
217 return MSVCP_char_traits_wchar__Move_s(dest, count, src, count);
220 /* ?assign@?$char_traits@_W@std@@SAPA_WPA_WI_W@Z */
221 /* ?assign@?$char_traits@_W@std@@SAPEA_WPEA_W_K_W@Z */
222 wchar_t* CDECL MSVCP_char_traits_wchar_assignn(wchar_t *str,
223 size_t num, wchar_t c)
225 size_t i;
227 for(i=0; i<num; i++)
228 str[i] = c;
230 return str;
233 static bool basic_string_char_inside(
234 basic_string_char *this, const char *ptr)
236 return ptr>=this->ptr && ptr<this->ptr+this->size;
239 /* ?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2IB */
240 /* ?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2_KB */
241 const size_t MSVCP_basic_string_char_npos = -1;
243 /* ?_C@?1??_Nullstr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPBDXZ@4DB */
244 /* ?_C@?1??_Nullstr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEBDXZ@4DB */
245 const char basic_string_char_nullbyte = '\0';
247 /* ?_Nullstr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPBDXZ */
248 /* ?_Nullstr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEBDXZ */
249 const char* __cdecl basic_string_char__Nullstr(void)
251 return &basic_string_char_nullbyte;
254 /* ?_Refcnt@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEAAEPBD@Z */
255 /* ?_Refcnt@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAAEAEPEBD@Z */
256 DEFINE_THISCALL_WRAPPER(basic_string_char__Refcnt, 8)
257 unsigned char* __thiscall basic_string_char__Refcnt(basic_string_char *this, const char *ptr)
259 TRACE("(%p %p)\n", this, ptr);
260 return (unsigned char*)ptr-1;
263 /* ?_Eos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXI@Z */
264 /* ?_Eos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAX_K@Z */
265 DEFINE_THISCALL_WRAPPER(basic_string_char__Eos, 8)
266 void __thiscall basic_string_char__Eos(basic_string_char *this, size_t len)
268 this->size = len;
269 this->ptr[len] = 0;
272 /* ?clear@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
273 /* ?clear@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
274 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_clear, 4)
275 void __thiscall MSVCP_basic_string_char_clear(basic_string_char *this)
277 if(this->ptr)
278 basic_string_char__Eos(this, 0);
281 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEX_N@Z */
282 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAX_N@Z */
283 DEFINE_THISCALL_WRAPPER(basic_string_char__Tidy, 8)
284 void __thiscall basic_string_char__Tidy(basic_string_char *this, bool built)
286 TRACE("(%p %d)\n", this, built);
288 if(!built || !this->ptr);
289 else if(!this->ptr[-1] || (unsigned char)this->ptr[-1]==FROZEN)
290 MSVCP_allocator_char_deallocate(NULL, this->ptr-1, this->res+2);
291 else
292 this->ptr[-1]--;
294 memset(this, 0, sizeof(*this));
297 /* ?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAE_NI_N@Z */
298 /* ?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAA_N_K_N@Z */
299 DEFINE_THISCALL_WRAPPER(basic_string_char__Grow, 12)
300 bool __thiscall basic_string_char__Grow(basic_string_char *this, size_t new_size, bool trim)
302 if(!new_size) {
303 if(trim)
304 basic_string_char__Tidy(this, TRUE);
305 else if(this->ptr)
306 basic_string_char__Eos(this, 0);
307 } else if(this->res<new_size || trim ||
308 (this->ptr && this->ptr[-1] && (unsigned char)this->ptr[-1]!=FROZEN)) {
309 size_t new_res = new_size, len = this->size;
310 char *ptr;
312 if(!trim && this->ptr && !this->ptr[-1]) {
313 new_res |= 0xf;
314 if(new_res/3 < this->res/2)
315 new_res = this->res + this->res/2;
318 ptr = MSVCP_allocator_char_allocate(this->allocator, new_res+2);
319 if(!ptr) {
320 new_res = new_size;
321 ptr = MSVCP_allocator_char_allocate(this->allocator, new_size+2);
323 if(!ptr) {
324 ERR("Out of memory\n");
325 return FALSE;
328 if(len > new_res)
329 len = new_res;
331 *ptr = 0;
332 if(this->ptr)
333 MSVCP_char_traits_char__Copy_s(ptr+1, new_size, this->ptr, len);
334 basic_string_char__Tidy(this, TRUE);
335 this->ptr = ptr+1;
336 this->res = new_res;
337 basic_string_char__Eos(this, len);
340 return new_size>0;
343 /* ?_Split@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXXZ */
344 /* ?_Split@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAXXZ */
345 DEFINE_THISCALL_WRAPPER(basic_string_char__Split, 4)
346 void __thiscall basic_string_char__Split(basic_string_char *this)
348 size_t len;
349 char *ptr;
351 TRACE("(%p)\n", this);
353 if(!this->ptr || !this->ptr[-1] || (unsigned char)this->ptr[-1]==FROZEN)
354 return;
356 ptr = this->ptr;
357 len = this->size;
358 basic_string_char__Tidy(this, TRUE);
359 if(basic_string_char__Grow(this, len, FALSE)) {
360 if(ptr)
361 MSVCP_char_traits_char__Copy_s(this->ptr, this->res, ptr, len);
362 basic_string_char__Eos(this, len);
366 /* ?_Freeze@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXXZ */
367 /* ?_Freeze@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAXXZ */
368 DEFINE_THISCALL_WRAPPER(basic_string_char__Freeze, 4)
369 void __thiscall basic_string_char__Freeze(basic_string_char *this)
371 TRACE("(%p)\n", this);
372 basic_string_char__Split(this);
373 if(this->ptr)
374 this->ptr[-1] = FROZEN;
377 /* ?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXI@Z */
378 /* ?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAX_K@Z */
379 DEFINE_THISCALL_WRAPPER(basic_string_char__Copy, 8)
380 void __thiscall basic_string_char__Copy(basic_string_char *this, size_t copy_len)
382 TRACE("%p %Iu\n", this, copy_len);
384 if(!basic_string_char__Grow(this, copy_len, TRUE))
385 return;
388 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPADPADI@Z */
389 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEADPEAD_K@Z */
390 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPBDPBDI@Z */
391 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEBDPEBD_K@Z */
392 char* __cdecl basic_string_char__Psum(char *iter, size_t add)
394 TRACE("(%p %Iu)\n", iter, add);
395 return iter ? iter+add : iter;
398 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z */
399 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0@Z */
400 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_erase, 12)
401 basic_string_char* __thiscall MSVCP_basic_string_char_erase(
402 basic_string_char *this, size_t pos, size_t len)
404 TRACE("%p %Iu %Iu\n", this, pos, len);
406 if(pos > this->size)
407 _Xran();
409 if(len > this->size-pos)
410 len = this->size-pos;
412 if(len) {
413 basic_string_char__Split(this);
414 MSVCP_char_traits_char__Move_s(this->ptr+pos, this->res-pos,
415 this->ptr+pos+len, this->size-pos-len);
416 basic_string_char__Eos(this, this->size-len);
419 return this;
422 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPAD@Z */
423 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEAD@Z */
424 DEFINE_THISCALL_WRAPPER(basic_string_char_erase_beg, 8)
425 char* __thiscall basic_string_char_erase_beg(basic_string_char *this, char *beg)
427 size_t pos = beg-this->ptr;
428 MSVCP_basic_string_char_erase(this, pos, 1);
429 return this->ptr+pos;
432 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */
433 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
434 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_substr, 16)
435 basic_string_char* __thiscall MSVCP_basic_string_char_assign_substr(
436 basic_string_char *this, const basic_string_char *assign,
437 size_t pos, size_t len)
439 TRACE("%p %p %Iu %Iu\n", this, assign, pos, len);
441 if(assign->size < pos)
442 _Xran();
444 if(len > assign->size-pos)
445 len = assign->size-pos;
447 if(this == assign) {
448 MSVCP_basic_string_char_erase(this, pos+len, MSVCP_basic_string_char_npos);
449 MSVCP_basic_string_char_erase(this, 0, pos);
450 } else if(basic_string_char__Grow(this, len, FALSE)) {
451 if(assign->ptr)
452 MSVCP_char_traits_char__Copy_s(this->ptr, this->res, assign->ptr+pos, len);
453 basic_string_char__Eos(this, len);
456 return this;
459 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z */
460 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z */
461 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_cstr_len, 12)
462 basic_string_char* __thiscall MSVCP_basic_string_char_assign_cstr_len(
463 basic_string_char *this, const char *str, size_t len)
465 TRACE("%p %s %Iu\n", this, debugstr_an(str, len), len);
467 if(basic_string_char_inside(this, str))
468 return MSVCP_basic_string_char_assign_substr(this, this, str-this->ptr, len);
469 else if(basic_string_char__Grow(this, len, FALSE)) {
470 MSVCP_char_traits_char__Copy_s(this->ptr, this->res, str, len);
471 basic_string_char__Eos(this, len);
474 return this;
477 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */
478 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */
479 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z */
480 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@AEBV01@@Z */
481 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign, 8)
482 basic_string_char* __thiscall MSVCP_basic_string_char_assign(
483 basic_string_char *this, const basic_string_char *assign)
485 return MSVCP_basic_string_char_assign_substr(this, assign,
486 0, MSVCP_basic_string_char_npos);
489 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z */
490 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD@Z */
491 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z */
492 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@PEBD@Z */
493 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_cstr, 8)
494 basic_string_char* __thiscall MSVCP_basic_string_char_assign_cstr(
495 basic_string_char *this, const char *str)
497 return MSVCP_basic_string_char_assign_cstr_len(this, str,
498 MSVCP_char_traits_char_length(str));
501 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@D@Z */
502 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@D@Z */
503 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_ch, 8)
504 basic_string_char* __thiscall MSVCP_basic_string_char_assign_ch(
505 basic_string_char *this, char ch)
507 return MSVCP_basic_string_char_assign_cstr_len(this, &ch, 1);
510 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */
511 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KD@Z */
512 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assignn, 12)
513 basic_string_char* __thiscall MSVCP_basic_string_char_assignn(
514 basic_string_char *this, size_t count, char ch)
516 TRACE("%p %Iu %c\n", this, count, ch);
518 basic_string_char__Grow(this, count, FALSE);
519 MSVCP_char_traits_char_assignn(this->ptr, count, ch);
520 basic_string_char__Eos(this, count);
521 return this;
524 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD0@Z */
525 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD0@Z */
526 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_ptr_ptr, 12)
527 basic_string_char* __thiscall MSVCP_basic_string_char_assign_ptr_ptr(
528 basic_string_char *this, const char *first, const char *last)
530 return MSVCP_basic_string_char_assign_cstr_len(this, first, last-first);
533 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDIABV?$allocator@D@1@@Z */
534 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD_KAEBV?$allocator@D@1@@Z */
535 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_cstr_len_alloc, 16)
536 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_len_alloc(
537 basic_string_char *this, const char *str, size_t len, const void *alloc)
539 TRACE("%p %s %Iu\n", this, debugstr_an(str, len), len);
541 basic_string_char__Tidy(this, FALSE);
542 MSVCP_basic_string_char_assign_cstr_len(this, str, len);
543 return this;
546 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDI@Z */
547 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD_K@Z */
548 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_cstr_len, 12)
549 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_len(
550 basic_string_char *this, const char *str, size_t len)
552 return MSVCP_basic_string_char_ctor_cstr_len_alloc(this, str, len, NULL);
555 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@IIABV?$allocator@D@1@@Z */
556 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@_K1AEBV?$allocator@D@1@@Z */
557 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_substr_alloc, 20)
558 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_substr_alloc(
559 basic_string_char *this, const basic_string_char *assign,
560 size_t pos, size_t len, const void *alloc)
562 TRACE("%p %p %Iu %Iu\n", this, assign, pos, len);
564 basic_string_char__Tidy(this, FALSE);
565 MSVCP_basic_string_char_assign_substr(this, assign, pos, len);
566 return this;
569 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDABV?$allocator@D@1@@Z */
570 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBDAEBV?$allocator@D@1@@Z */
571 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_cstr_alloc, 12)
572 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_alloc(
573 basic_string_char *this, const char *str, const void *alloc)
575 TRACE("%p %s\n", this, debugstr_a(str));
577 basic_string_char__Tidy(this, FALSE);
578 MSVCP_basic_string_char_assign_cstr(this, str);
579 return this;
582 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z */
583 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD@Z */
584 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_cstr, 8)
585 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr(
586 basic_string_char *this, const char *str)
588 return MSVCP_basic_string_char_ctor_cstr_alloc(this, str, NULL);
591 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@IDABV?$allocator@D@1@@Z */
592 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@_KDAEBV?$allocator@D@1@@Z */
593 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_ch_alloc, 16)
594 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_ch_alloc(basic_string_char *this,
595 size_t count, char ch, const void *alloc)
597 TRACE("%p %Iu %c\n", this, count, ch);
599 basic_string_char__Tidy(this, FALSE);
600 MSVCP_basic_string_char_assignn(this, count, ch);
601 return this;
604 /* ??_F?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
605 /* ??_F?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
606 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor, 4)
607 basic_string_char* __thiscall MSVCP_basic_string_char_ctor(basic_string_char *this)
609 TRACE("%p\n", this);
611 basic_string_char__Tidy(this, FALSE);
612 return this;
615 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$allocator@D@1@@Z */
616 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV?$allocator@D@1@@Z */
617 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_alloc, 8)
618 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_alloc(
619 basic_string_char *this, const void *alloc)
621 TRACE("%p %p\n", this, alloc);
623 basic_string_char__Tidy(this, FALSE);
624 return this;
627 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z */
628 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@@Z */
629 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_copy_ctor, 8)
630 basic_string_char* __thiscall MSVCP_basic_string_char_copy_ctor(
631 basic_string_char *this, const basic_string_char *copy)
633 TRACE("%p %p\n", this, copy);
635 basic_string_char__Tidy(this, FALSE);
636 MSVCP_basic_string_char_assign(this, copy);
637 return this;
640 /* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ */
641 /* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@XZ */
642 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_dtor, 4)
643 void __thiscall MSVCP_basic_string_char_dtor(basic_string_char *this)
645 TRACE("%p\n", this);
646 basic_string_char__Tidy(this, TRUE);
649 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIPBDI@Z */
650 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0PEBD0@Z */
651 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_substr_cstr_len, 20)
652 int __thiscall MSVCP_basic_string_char_compare_substr_cstr_len(
653 const basic_string_char *this, size_t pos, size_t num,
654 const char *str, size_t count)
656 int ans;
658 TRACE("%p %Iu %Iu %s %Iu\n", this, pos, num, debugstr_an(str, count), count);
660 if(this->size < pos)
661 _Xran();
663 if(num > this->size-pos)
664 num = this->size-pos;
666 ans = MSVCP_char_traits_char_compare(this->ptr+pos,
667 str, num>count ? count : num);
668 if(ans)
669 return ans;
671 if(num > count)
672 ans = 1;
673 else if(num < count)
674 ans = -1;
675 return ans;
678 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHPBD@Z */
679 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAHPEBD@Z */
680 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_cstr, 8)
681 int __thiscall MSVCP_basic_string_char_compare_cstr(
682 const basic_string_char *this, const char *str)
684 return MSVCP_basic_string_char_compare_substr_cstr_len(this, 0, this->size,
685 str, MSVCP_char_traits_char_length(str));
688 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIABV12@II@Z */
689 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0AEBV12@00@Z */
690 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_substr_substr, 24)
691 int __thiscall MSVCP_basic_string_char_compare_substr_substr(
692 const basic_string_char *this, size_t pos, size_t num,
693 const basic_string_char *compare, size_t off, size_t count)
695 TRACE("%p %Iu %Iu %p %Iu %Iu\n", this, pos, num, compare, off, count);
697 if(compare->size < off)
698 _Xran();
700 if(count > compare->size-off)
701 count = compare->size-off;
703 return MSVCP_basic_string_char_compare_substr_cstr_len(this, pos, num,
704 compare->ptr+off, count);
707 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIABV12@@Z */
708 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0AEBV12@@Z */
709 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_substr, 16)
710 int __thiscall MSVCP_basic_string_char_compare_substr(
711 const basic_string_char *this, size_t pos, size_t num,
712 const basic_string_char *compare)
714 return MSVCP_basic_string_char_compare_substr_cstr_len(this, pos, num,
715 compare->ptr, compare->size);
718 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHABV12@@Z */
719 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAHAEBV12@@Z */
720 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare, 8)
721 int __thiscall MSVCP_basic_string_char_compare(
722 const basic_string_char *this, const basic_string_char *compare)
724 return MSVCP_basic_string_char_compare_substr_cstr_len(this, 0, this->size,
725 compare->ptr, compare->size);
728 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIPBD@Z */
729 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0PEBD@Z */
730 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_substr_cstr, 16)
731 int __thiscall MSVCP_basic_string_char_compare_substr_cstr(const basic_string_char *this,
732 size_t pos, size_t num, const char *str)
734 return MSVCP_basic_string_char_compare_substr_cstr_len(this, pos, num,
735 str, MSVCP_char_traits_char_length(str));
738 /* ??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
739 /* ??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
740 /* ??8std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
741 /* ??8std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
742 bool __cdecl MSVCP_basic_string_char_equal(
743 const basic_string_char *left, const basic_string_char *right)
745 return MSVCP_basic_string_char_compare(left, right) == 0;
748 /* ??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
749 /* ??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
750 /* ??8std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
751 /* ??8std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
752 bool __cdecl MSVCP_basic_string_char_equal_str_cstr(
753 const basic_string_char *left, const char *right)
755 return MSVCP_basic_string_char_compare_cstr(left, right) == 0;
758 /* ??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
759 /* ??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
760 /* ??8std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
761 /* ??8std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
762 bool __cdecl MSVCP_basic_string_char_equal_cstr_str(
763 const char *left, const basic_string_char *right)
765 return MSVCP_basic_string_char_compare_cstr(right, left) == 0;
768 /* ??$?9DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
769 /* ??$?9DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
770 /* ??9std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
771 /* ??9std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
772 bool __cdecl MSVCP_basic_string_char_not_equal(
773 const basic_string_char *left, const basic_string_char *right)
775 return MSVCP_basic_string_char_compare(left, right) != 0;
778 /* ??$?9DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
779 /* ??$?9DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
780 /* ??9std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
781 /* ??9std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
782 bool __cdecl MSVCP_basic_string_char_not_equal_str_cstr(
783 const basic_string_char *left, const char *right)
785 return MSVCP_basic_string_char_compare_cstr(left, right) != 0;
788 /* ??$?9DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
789 /* ??$?9DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
790 /* ??9std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
791 /* ??9std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
792 bool __cdecl MSVCP_basic_string_char_not_equal_cstr_str(
793 const char *left, const basic_string_char *right)
795 return MSVCP_basic_string_char_compare_cstr(right, left) != 0;
798 /* ??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
799 /* ??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
800 /* ??Mstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
801 /* ??Mstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
802 bool __cdecl MSVCP_basic_string_char_lower(
803 const basic_string_char *left, const basic_string_char *right)
805 return MSVCP_basic_string_char_compare(left, right) < 0;
808 /* ??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
809 /* ??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
810 /* ??Mstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
811 /* ??Mstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
812 bool __cdecl MSVCP_basic_string_char_lower_bstr_cstr(
813 const basic_string_char *left, const char *right)
815 return MSVCP_basic_string_char_compare_cstr(left, right) < 0;
818 /* ??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
819 /* ??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
820 /* ??Mstd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
821 /* ??Mstd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
822 bool __cdecl MSVCP_basic_string_char_lower_cstr_bstr(
823 const char *left, const basic_string_char *right)
825 return MSVCP_basic_string_char_compare_cstr(right, left) > 0;
828 /* ??$?NDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
829 /* ??$?NDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
830 /* ??Nstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
831 /* ??Nstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
832 bool __cdecl MSVCP_basic_string_char_leq(
833 const basic_string_char *left, const basic_string_char *right)
835 return MSVCP_basic_string_char_compare(left, right) <= 0;
838 /* ??$?NDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
839 /* ??$?NDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
840 /* ??Nstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
841 /* ??Nstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
842 bool __cdecl MSVCP_basic_string_char_leq_bstr_cstr(
843 const basic_string_char *left, const char *right)
845 return MSVCP_basic_string_char_compare_cstr(left, right) <= 0;
848 /* ??$?NDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
849 /* ??$?NDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
850 /* ??Nstd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
851 /* ??Nstd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
852 bool __cdecl MSVCP_basic_string_char_leq_cstr_bstr(
853 const char *left, const basic_string_char *right)
855 return MSVCP_basic_string_char_compare_cstr(right, left) >= 0;
858 /* ??$?ODU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
859 /* ??$?ODU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
860 /* ??Ostd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
861 /* ??Ostd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
862 bool __cdecl MSVCP_basic_string_char_greater(
863 const basic_string_char *left, const basic_string_char *right)
865 return MSVCP_basic_string_char_compare(left, right) > 0;
868 /* ??$?ODU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
869 /* ??$?ODU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
870 /* ??Ostd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
871 /* ??Ostd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
872 bool __cdecl MSVCP_basic_string_char_greater_bstr_cstr(
873 const basic_string_char *left, const char *right)
875 return MSVCP_basic_string_char_compare_cstr(left, right) > 0;
878 /* ??$?ODU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
879 /* ??$?ODU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
880 /* ??Ostd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
881 /* ??Ostd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
882 bool __cdecl MSVCP_basic_string_char_greater_cstr_bstr(
883 const char *left, const basic_string_char *right)
885 return MSVCP_basic_string_char_compare_cstr(right, left) < 0;
888 /* ??$?PDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
889 /* ??$?PDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
890 /* ??Pstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
891 /* ??Pstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
892 bool __cdecl MSVCP_basic_string_char_geq(
893 const basic_string_char *left, const basic_string_char *right)
895 return MSVCP_basic_string_char_compare(left, right) >= 0;
898 /* ??$?PDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
899 /* ??$?PDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
900 /* ??Pstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
901 /* ??Pstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
902 bool __cdecl MSVCP_basic_string_char_geq_bstr_cstr(
903 const basic_string_char *left, const char *right)
905 return MSVCP_basic_string_char_compare_cstr(left, right) >= 0;
908 /* ??$?PDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
909 /* ??$?PDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
910 /* ??Pstd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
911 /* ??Pstd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
912 bool __cdecl MSVCP_basic_string_char_geq_cstr_bstr(
913 const char *left, const basic_string_char *right)
915 return MSVCP_basic_string_char_compare_cstr(right, left) <= 0;
918 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
919 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
920 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_cstr_substr, 16)
921 size_t __thiscall MSVCP_basic_string_char_find_cstr_substr(
922 const basic_string_char *this, const char *find, size_t pos, size_t len)
924 const char *p, *end;
926 TRACE("%p %s %Iu %Iu\n", this, debugstr_an(find, len), pos, len);
928 if(len==0 && pos<=this->size)
929 return pos;
930 if(pos>=this->size || len>this->size)
931 return MSVCP_basic_string_char_npos;
933 end = this->ptr+this->size-len+1;
934 for(p=this->ptr+pos; p<end; p++) {
935 p = MSVCP_char_traits_char_find(p, end-p, find);
936 if(!p)
937 break;
939 if(!MSVCP_char_traits_char_compare(p, find, len))
940 return p-this->ptr;
943 return MSVCP_basic_string_char_npos;
946 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
947 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
948 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_off, 12)
949 size_t __thiscall MSVCP_basic_string_char_find_off(
950 const basic_string_char *this, const basic_string_char *find, size_t off)
952 return MSVCP_basic_string_char_find_cstr_substr(this, find->ptr, off, find->size);
955 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
956 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
957 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_ch, 12)
958 size_t __thiscall MSVCP_basic_string_char_find_ch(
959 const basic_string_char *this, char ch, size_t pos)
961 return MSVCP_basic_string_char_find_cstr_substr(this, &ch, pos, 1);
964 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
965 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
966 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_cstr_off, 12)
967 size_t __thiscall MSVCP_basic_string_char_find_cstr_off(
968 const basic_string_char *this, const char *find, size_t pos)
970 return MSVCP_basic_string_char_find_cstr_substr(this, find, pos,
971 MSVCP_char_traits_char_length(find));
974 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
975 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
976 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_rfind_cstr_substr, 16)
977 size_t __thiscall MSVCP_basic_string_char_rfind_cstr_substr(
978 const basic_string_char *this, const char *find, size_t pos, size_t len)
980 const char *p, *end;
982 TRACE("%p %s %Iu %Iu\n", this, debugstr_an(find, len), pos, len);
984 if(len==0)
985 return pos<this->size ? pos : this->size;
987 if(len > this->size)
988 return MSVCP_basic_string_char_npos;
990 if(pos > this->size-len)
991 pos = this->size-len;
992 end = this->ptr;
993 for(p=end+pos; p>=end; p--) {
994 if(*p==*find && !MSVCP_char_traits_char_compare(p, find, len))
995 return p-this->ptr;
998 return MSVCP_basic_string_char_npos;
1001 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1002 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1003 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_rfind_off, 12)
1004 size_t __thiscall MSVCP_basic_string_char_rfind_off(
1005 const basic_string_char *this, const basic_string_char *find, size_t off)
1007 return MSVCP_basic_string_char_rfind_cstr_substr(this, find->ptr, off, find->size);
1010 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1011 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1012 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_rfind_ch, 12)
1013 size_t __thiscall MSVCP_basic_string_char_rfind_ch(
1014 const basic_string_char *this, char ch, size_t pos)
1016 return MSVCP_basic_string_char_rfind_cstr_substr(this, &ch, pos, 1);
1019 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1020 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1021 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_rfind_cstr_off, 12)
1022 size_t __thiscall MSVCP_basic_string_char_rfind_cstr_off(
1023 const basic_string_char *this, const char *find, size_t pos)
1025 return MSVCP_basic_string_char_rfind_cstr_substr(this, find, pos,
1026 MSVCP_char_traits_char_length(find));
1029 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1030 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1031 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_not_of_cstr_substr, 16)
1032 size_t __thiscall MSVCP_basic_string_char_find_first_not_of_cstr_substr(
1033 const basic_string_char *this, const char *find, size_t off, size_t len)
1035 const char *p, *end;
1037 TRACE("%p %p %Iu %Iu\n", this, find, off, len);
1039 if(off<this->size) {
1040 end = this->ptr+this->size;
1041 for(p=this->ptr+off; p<end; p++)
1042 if(!MSVCP_char_traits_char_find(find, len, p))
1043 return p-this->ptr;
1046 return MSVCP_basic_string_char_npos;
1049 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1050 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1051 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_not_of, 12)
1052 size_t __thiscall MSVCP_basic_string_char_find_first_not_of(
1053 const basic_string_char *this, const basic_string_char *find, size_t off)
1055 return MSVCP_basic_string_char_find_first_not_of_cstr_substr(this,
1056 find->ptr, off, find->size);
1059 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1060 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1061 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_not_of_ch, 12)
1062 size_t __thiscall MSVCP_basic_string_char_find_first_not_of_ch(
1063 const basic_string_char *this, char ch, size_t off)
1065 return MSVCP_basic_string_char_find_first_not_of_cstr_substr(this, &ch, off, 1);
1068 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1069 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1070 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_not_of_cstr, 12)
1071 size_t __thiscall MSVCP_basic_string_char_find_first_not_of_cstr(
1072 const basic_string_char *this, const char *find, size_t off)
1074 return MSVCP_basic_string_char_find_first_not_of_cstr_substr(
1075 this, find, off, MSVCP_char_traits_char_length(find));
1078 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1079 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1080 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_of_cstr_substr, 16)
1081 size_t __thiscall MSVCP_basic_string_char_find_first_of_cstr_substr(
1082 const basic_string_char *this, const char *find, size_t off, size_t len)
1084 const char *p, *end;
1086 TRACE("%p %p %Iu %Iu\n", this, find, off, len);
1088 if(len>0 && off<this->size) {
1089 end = this->ptr+this->size;
1090 for(p=this->ptr+off; p<end; p++)
1091 if(MSVCP_char_traits_char_find(find, len, p))
1092 return p-this->ptr;
1095 return MSVCP_basic_string_char_npos;
1098 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1099 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1100 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_of, 12)
1101 size_t __thiscall MSVCP_basic_string_char_find_first_of(
1102 const basic_string_char *this, const basic_string_char *find, size_t off)
1104 return MSVCP_basic_string_char_find_first_of_cstr_substr(this,
1105 find->ptr, off, find->size);
1108 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1109 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1110 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_of_ch, 12)
1111 size_t __thiscall MSVCP_basic_string_char_find_first_of_ch(
1112 const basic_string_char *this, char ch, size_t off)
1114 return MSVCP_basic_string_char_find_first_of_cstr_substr(this, &ch, off, 1);
1117 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1118 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1119 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_of_cstr, 12)
1120 size_t __thiscall MSVCP_basic_string_char_find_first_of_cstr(
1121 const basic_string_char *this, const char *find, size_t off)
1123 return MSVCP_basic_string_char_find_first_of_cstr_substr(
1124 this, find, off, MSVCP_char_traits_char_length(find));
1127 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1128 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1129 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_not_of_cstr_substr, 16)
1130 size_t __thiscall MSVCP_basic_string_char_find_last_not_of_cstr_substr(
1131 const basic_string_char *this, const char *find, size_t off, size_t len)
1133 const char *p, *beg;
1135 TRACE("%p %p %Iu %Iu\n", this, find, off, len);
1137 if(len>0 && this->size>0) {
1138 if(off >= this->size)
1139 off = this->size-1;
1141 beg = this->ptr;
1142 for(p=beg+off; p>=beg; p--)
1143 if(!MSVCP_char_traits_char_find(find, len, p))
1144 return p-beg;
1147 return MSVCP_basic_string_char_npos;
1150 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1151 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1152 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_not_of, 12)
1153 size_t __thiscall MSVCP_basic_string_char_find_last_not_of(
1154 const basic_string_char *this, const basic_string_char *find, size_t off)
1156 return MSVCP_basic_string_char_find_last_not_of_cstr_substr(this,
1157 find->ptr, off, find->size);
1160 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1161 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1162 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_not_of_ch, 12)
1163 size_t __thiscall MSVCP_basic_string_char_find_last_not_of_ch(
1164 const basic_string_char *this, char ch, size_t off)
1166 return MSVCP_basic_string_char_find_last_not_of_cstr_substr(this, &ch, off, 1);
1169 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1170 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1171 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_not_of_cstr, 12)
1172 size_t __thiscall MSVCP_basic_string_char_find_last_not_of_cstr(
1173 const basic_string_char *this, const char *find, size_t off)
1175 return MSVCP_basic_string_char_find_last_not_of_cstr_substr(
1176 this, find, off, MSVCP_char_traits_char_length(find));
1179 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1180 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1181 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_of_cstr_substr, 16)
1182 size_t __thiscall MSVCP_basic_string_char_find_last_of_cstr_substr(
1183 const basic_string_char *this, const char *find, size_t off, size_t len)
1185 const char *p, *beg;
1187 TRACE("%p %p %Iu %Iu\n", this, find, off, len);
1189 if(len>0 && this->size>0) {
1190 if(off >= this->size)
1191 off = this->size-1;
1193 beg = this->ptr;
1194 for(p=beg+off; p>=beg; p--)
1195 if(MSVCP_char_traits_char_find(find, len, p))
1196 return p-beg;
1199 return MSVCP_basic_string_char_npos;
1202 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1203 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1204 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_of, 12)
1205 size_t __thiscall MSVCP_basic_string_char_find_last_of(
1206 const basic_string_char *this, const basic_string_char *find, size_t off)
1208 return MSVCP_basic_string_char_find_last_of_cstr_substr(this,
1209 find->ptr, off, find->size);
1212 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1213 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1214 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_of_ch, 12)
1215 size_t __thiscall MSVCP_basic_string_char_find_last_of_ch(
1216 const basic_string_char *this, char ch, size_t off)
1218 return MSVCP_basic_string_char_find_last_of_cstr_substr(this, &ch, off, 1);
1221 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1222 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1223 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_of_cstr, 12)
1224 size_t __thiscall MSVCP_basic_string_char_find_last_of_cstr(
1225 const basic_string_char *this, const char *find, size_t off)
1227 return MSVCP_basic_string_char_find_last_of_cstr_substr(
1228 this, find, off, MSVCP_char_traits_char_length(find));
1231 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */
1232 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
1233 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_substr, 16)
1234 basic_string_char* __thiscall MSVCP_basic_string_char_append_substr(basic_string_char *this,
1235 const basic_string_char *append, size_t offset, size_t count)
1237 TRACE("%p %p %Iu %Iu\n", this, append, offset, count);
1239 if(append->size < offset)
1240 _Xran();
1242 if(count > append->size-offset)
1243 count = append->size-offset;
1245 if(MSVCP_basic_string_char_npos-this->size<=count || this->size+count<this->size)
1246 _Xlen();
1248 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1249 if(append->ptr)
1250 MSVCP_char_traits_char__Copy_s(this->ptr+this->size, this->res-this->size,
1251 append->ptr+offset, count);
1252 basic_string_char__Eos(this, this->size+count);
1255 return this;
1258 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z */
1259 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z */
1260 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_cstr_len, 12)
1261 basic_string_char* __thiscall MSVCP_basic_string_char_append_cstr_len(
1262 basic_string_char *this, const char *append, size_t count)
1264 TRACE("%p %s %Iu\n", this, debugstr_an(append, count), count);
1266 if(basic_string_char_inside(this, append))
1267 return MSVCP_basic_string_char_append_substr(this, this, append-this->ptr, count);
1269 if(MSVCP_basic_string_char_npos-this->size<=count || this->size+count<this->size)
1270 _Xlen();
1272 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1273 MSVCP_char_traits_char__Copy_s(this->ptr+this->size,
1274 this->res-this->size, append, count);
1275 basic_string_char__Eos(this, this->size+count);
1278 return this;
1281 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */
1282 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KD@Z */
1283 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_len_ch, 12)
1284 basic_string_char* __thiscall MSVCP_basic_string_char_append_len_ch(
1285 basic_string_char *this, size_t count, char ch)
1287 TRACE("%p %Iu %c\n", this, count, ch);
1289 if(MSVCP_basic_string_char_npos-this->size <= count)
1290 _Xlen();
1292 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1293 MSVCP_char_traits_char_assignn(this->ptr+this->size, count, ch);
1294 basic_string_char__Eos(this, this->size+count);
1297 return this;
1300 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */
1301 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */
1302 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z */
1303 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@AEBV01@@Z */
1304 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append, 8)
1305 basic_string_char* __thiscall MSVCP_basic_string_char_append(
1306 basic_string_char *this, const basic_string_char *append)
1308 return MSVCP_basic_string_char_append_substr(this, append,
1309 0, MSVCP_basic_string_char_npos);
1312 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@D@Z */
1313 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@D@Z */
1314 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_ch, 8)
1315 basic_string_char* __thiscall MSVCP_basic_string_char_append_ch(
1316 basic_string_char *this, char ch)
1318 return MSVCP_basic_string_char_append_len_ch(this, 1, ch);
1321 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD0@Z */
1322 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD0@Z */
1323 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_beg_end, 12)
1324 basic_string_char* __thiscall MSVCP_basic_string_char_append_beg_end(
1325 basic_string_char *this, const char *beg, const char *end)
1327 return MSVCP_basic_string_char_append_cstr_len(this, beg, end-beg);
1330 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z */
1331 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD@Z */
1332 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z */
1333 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@PEBD@Z */
1334 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_cstr, 8)
1335 basic_string_char* __thiscall MSVCP_basic_string_char_append_cstr(
1336 basic_string_char *this, const char *append)
1338 return MSVCP_basic_string_char_append_cstr_len(this, append,
1339 MSVCP_char_traits_char_length(append));
1341 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z */
1342 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@0@Z */
1343 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z */
1344 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@0@Z */
1345 basic_string_char* __cdecl MSVCP_basic_string_char_concatenate(basic_string_char *ret,
1346 const basic_string_char *left, const basic_string_char *right)
1348 TRACE("%p %p\n", left, right);
1350 MSVCP_basic_string_char_copy_ctor(ret, left);
1351 MSVCP_basic_string_char_append(ret, right);
1352 return ret;
1355 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@D@Z */
1356 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@D@Z */
1357 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@D@Z */
1358 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@D@Z */
1359 basic_string_char* __cdecl MSVCP_basic_string_char_concatenate_bstr_ch(basic_string_char *ret,
1360 const basic_string_char *left, char right)
1362 TRACE("%p %c\n", left, right);
1364 MSVCP_basic_string_char_copy_ctor(ret, left);
1365 MSVCP_basic_string_char_append_ch(ret, right);
1366 return ret;
1369 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z */
1370 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@PEBD@Z */
1371 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z */
1372 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@PEBD@Z */
1373 basic_string_char* __cdecl MSVCP_basic_string_char_concatenate_bstr_cstr(basic_string_char *ret,
1374 const basic_string_char *left, const char *right)
1376 TRACE("%p %s\n", left, debugstr_a(right));
1378 MSVCP_basic_string_char_copy_ctor(ret, left);
1379 MSVCP_basic_string_char_append_cstr(ret, right);
1380 return ret;
1383 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DABV10@@Z */
1384 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DAEBV10@@Z */
1385 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DABV10@@Z */
1386 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DAEBV10@@Z */
1387 basic_string_char* __cdecl MSVCP_basic_string_char_concatenate_ch_bstr(basic_string_char *ret,
1388 char left, const basic_string_char *right)
1390 TRACE("%c %p\n", left, right);
1392 MSVCP_basic_string_char_ctor_cstr_len_alloc(ret, &left, 1, NULL);
1393 MSVCP_basic_string_char_append(ret, right);
1394 return ret;
1397 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z */
1398 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBDAEBV10@@Z */
1399 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z */
1400 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBDAEBV10@@Z */
1401 basic_string_char* __cdecl MSVCP_basic_string_char_concatenate_cstr_bstr(basic_string_char *ret,
1402 const char *left, const basic_string_char *right)
1404 TRACE("%s %p\n", debugstr_a(left), right);
1406 MSVCP_basic_string_char_ctor_cstr_alloc(ret, left, NULL);
1407 MSVCP_basic_string_char_append(ret, right);
1408 return ret;
1411 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */
1412 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */
1413 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_operator_at, 8)
1414 char* __thiscall MSVCP_basic_string_char_operator_at(
1415 basic_string_char *this, size_t pos)
1417 TRACE("%p %Iu\n", this, pos);
1419 if(!this->ptr || pos>this->size)
1420 return (char*)basic_string_char__Nullstr();
1422 basic_string_char__Freeze(this);
1423 return this->ptr+pos;
1426 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */
1427 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */
1428 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_operator_at_const, 8)
1429 const char* __thiscall MSVCP_basic_string_char_operator_at_const(
1430 const basic_string_char *this, size_t pos)
1432 TRACE("%p %Iu\n", this, pos);
1434 if(!this->ptr)
1435 return basic_string_char__Nullstr();
1436 return this->ptr+pos;
1439 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */
1440 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */
1441 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */
1442 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */
1443 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_at, 8)
1444 char* __thiscall MSVCP_basic_string_char_at(
1445 basic_string_char *this, size_t pos)
1447 TRACE("%p %Iu\n", this, pos);
1449 if(this->size <= pos)
1450 _Xran();
1452 return this->ptr+pos;
1455 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBDI@Z */
1456 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD0@Z */
1457 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_cstr_len, 20)
1458 basic_string_char* __thiscall basic_string_char_replace_cstr_len(basic_string_char *this,
1459 size_t off, size_t len, const char *str, size_t str_len)
1461 size_t inside_pos = -1;
1462 char *ptr = this->ptr;
1464 TRACE("%p %Iu %Iu %p %Iu\n", this, off, len, str, str_len);
1466 if(this->size < off)
1467 _Xran();
1469 if(len > this->size-off)
1470 len = this->size-off;
1472 if(MSVCP_basic_string_char_npos-str_len <= this->size-len)
1473 _Xlen();
1475 if(basic_string_char_inside(this, str))
1476 inside_pos = str-ptr;
1478 if(this->size-len+str_len)
1479 basic_string_char__Grow(this, this->size-len+str_len, FALSE);
1480 ptr = this->ptr;
1482 if(inside_pos == -1) {
1483 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1484 memcpy(ptr+off, str, str_len*sizeof(char));
1485 } else if(len >= str_len) {
1486 memmove(ptr+off, ptr+inside_pos, str_len*sizeof(char));
1487 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1488 } else {
1489 size_t size;
1491 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1493 if(inside_pos < off+len) {
1494 size = off+len-inside_pos;
1495 if(size > str_len)
1496 size = str_len;
1497 memmove(ptr+off, ptr+inside_pos, size*sizeof(char));
1498 } else {
1499 size = 0;
1502 if(str_len > size)
1503 memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(char));
1506 if(this->ptr)
1507 basic_string_char__Eos(this, this->size-len+str_len);
1508 return this;
1511 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@II@Z */
1512 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0AEBV12@00@Z */
1513 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_substr, 24)
1514 basic_string_char* __thiscall basic_string_char_replace_substr(basic_string_char *this, size_t off,
1515 size_t len, const basic_string_char *str, size_t str_off, size_t str_len)
1517 if(str->size < str_off)
1518 _Xran();
1520 if(str_len > str->size-str_off)
1521 str_len = str->size-str_off;
1523 return basic_string_char_replace_cstr_len(this, off, len,
1524 str->ptr+str_off, str_len);
1527 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@@Z */
1528 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0AEBV12@@Z */
1529 DEFINE_THISCALL_WRAPPER(basic_string_char_replace, 16)
1530 basic_string_char* __thiscall basic_string_char_replace(basic_string_char *this,
1531 size_t off, size_t len, const basic_string_char *str)
1533 return basic_string_char_replace_cstr_len(this, off, len,
1534 str->ptr, str->size);
1537 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIID@Z */
1538 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K00D@Z */
1539 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_ch, 20)
1540 basic_string_char* __thiscall basic_string_char_replace_ch(basic_string_char *this,
1541 size_t off, size_t len, size_t count, char ch)
1543 char *ptr;
1545 TRACE("%p %Iu %Iu %Iu %c\n", this, off, len, count, ch);
1547 if(this->size < off)
1548 _Xran();
1550 if(len > this->size-off)
1551 len = this->size-off;
1553 if(MSVCP_basic_string_char_npos-count <= this->size-len)
1554 _Xlen();
1556 if(this->size-len+count)
1557 basic_string_char__Grow(this, this->size-len+count, FALSE);
1558 ptr = this->ptr;
1560 memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(char));
1561 MSVCP_char_traits_char_assignn(ptr+off, count, ch);
1562 basic_string_char__Eos(this, this->size-len+count);
1564 return this;
1567 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBD@Z */
1568 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD@Z */
1569 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_cstr, 16)
1570 basic_string_char* __thiscall basic_string_char_replace_cstr(basic_string_char *this,
1571 size_t off, size_t len, const char *str)
1573 return basic_string_char_replace_cstr_len(this, off, len, str,
1574 MSVCP_char_traits_char_length(str));
1577 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IABV12@@Z */
1578 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KAEBV12@@Z */
1579 DEFINE_THISCALL_WRAPPER(basic_string_char_insert, 12)
1580 basic_string_char* __thiscall basic_string_char_insert(basic_string_char *this,
1581 size_t off, const basic_string_char *str)
1583 return basic_string_char_replace(this, off, 0, str);
1586 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IABV12@II@Z */
1587 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KAEBV12@00@Z */
1588 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_substr, 20)
1589 basic_string_char* __thiscall basic_string_char_insert_substr(
1590 basic_string_char *this, size_t off, const basic_string_char *str,
1591 size_t str_off, size_t str_count)
1593 return basic_string_char_replace_substr(this, off, 0, str, str_off, str_count);
1596 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IPBD@Z */
1597 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KPEBD@Z */
1598 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_cstr, 12)
1599 basic_string_char* __thiscall basic_string_char_insert_cstr(
1600 basic_string_char *this, size_t off, const char *str)
1602 return basic_string_char_replace_cstr(this, off, 0, str);
1605 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IPBDI@Z */
1606 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KPEBD0@Z */
1607 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_cstr_len, 16)
1608 basic_string_char* __thiscall basic_string_char_insert_cstr_len(basic_string_char *this,
1609 size_t off, const char *str, size_t str_len)
1611 return basic_string_char_replace_cstr_len(this, off, 0, str, str_len);
1614 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IID@Z */
1615 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0D@Z */
1616 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_chn, 16)
1617 basic_string_char* __thiscall basic_string_char_insert_chn(basic_string_char *this,
1618 size_t off, size_t count, char ch)
1620 return basic_string_char_replace_ch(this, off, 0, count, ch);
1623 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXID@Z */
1624 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_KD@Z */
1625 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_resize_ch, 12)
1626 void __thiscall MSVCP_basic_string_char_resize_ch(
1627 basic_string_char *this, size_t size, char ch)
1629 TRACE("%p %Iu %c\n", this, size, ch);
1631 if(size <= this->size)
1632 MSVCP_basic_string_char_erase(this, size, this->size);
1633 else
1634 MSVCP_basic_string_char_append_len_ch(this, size-this->size, ch);
1637 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z */
1638 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z */
1639 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_resize, 8)
1640 void __thiscall MSVCP_basic_string_char_resize(
1641 basic_string_char *this, size_t size)
1643 MSVCP_basic_string_char_resize_ch(this, size, '\0');
1646 /* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1647 /* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1648 /* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1649 /* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1650 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_c_str, 4)
1651 const char* __thiscall MSVCP_basic_string_char_c_str(const basic_string_char *this)
1653 TRACE("%p\n", this);
1654 return this->ptr ? this->ptr : basic_string_char__Nullstr();
1657 /* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1658 /* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1659 /* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1660 /* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1661 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_length, 4)
1662 size_t __thiscall MSVCP_basic_string_char_length(const basic_string_char *this)
1664 TRACE("%p\n", this);
1665 return this->size;
1668 /* ?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1669 /* ?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1670 DEFINE_THISCALL_WRAPPER(basic_string_char_max_size, 4)
1671 size_t __thiscall basic_string_char_max_size(const basic_string_char *this)
1673 TRACE("%p\n", this);
1674 return MSVCP_allocator_char_max_size(NULL)-1;
1677 /* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1678 /* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1679 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_capacity, 4)
1680 size_t __thiscall MSVCP_basic_string_char_capacity(basic_string_char *this)
1682 TRACE("%p\n", this);
1683 return this->res;
1686 /* ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z */
1687 /* ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z */
1688 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_reserve, 8)
1689 void __thiscall MSVCP_basic_string_char_reserve(basic_string_char *this, size_t size)
1691 size_t len;
1693 TRACE("%p %Iu\n", this, size);
1695 len = this->size;
1696 if(len > size)
1697 return;
1699 if(basic_string_char__Grow(this, size, FALSE))
1700 basic_string_char__Eos(this, len);
1703 /* ?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE_NXZ */
1704 /* ?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_NXZ */
1705 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_empty, 4)
1706 bool __thiscall MSVCP_basic_string_char_empty(basic_string_char *this)
1708 TRACE("%p\n", this);
1709 return this->size == 0;
1712 /* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXAAV12@@Z */
1713 /* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEAV12@@Z */
1714 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_swap, 8)
1715 void __thiscall MSVCP_basic_string_char_swap(basic_string_char *this, basic_string_char *str)
1717 basic_string_char tmp;
1718 TRACE("%p %p\n", this, str);
1720 tmp = *this;
1721 *this = *str;
1722 *str = tmp;
1725 /* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV12@II@Z */
1726 /* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV12@_K0@Z */
1727 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_substr, 16)
1728 basic_string_char* __thiscall MSVCP_basic_string_char_substr(basic_string_char *this,
1729 basic_string_char *ret, size_t off, size_t len)
1731 TRACE("%p %Iu %Iu\n", this, off, len);
1733 MSVCP_basic_string_char_ctor_substr_alloc(ret, this, off, len, NULL);
1734 return ret;
1737 /* ?copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPADII@Z */
1738 /* ?copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEAD_K1@Z */
1739 DEFINE_THISCALL_WRAPPER(basic_string_char_copy, 16)
1740 size_t __thiscall basic_string_char_copy(const basic_string_char *this,
1741 char *dest, size_t count, size_t off)
1743 TRACE("%p %p %Iu %Iu\n", this, dest, count, off);
1745 if(off > this->size)
1746 _Xran();
1747 if(count > this->size-off)
1748 count = this->size-off;
1749 if(this->ptr)
1750 MSVCP_char_traits_char__Copy_s(dest, count, this->ptr+off, count);
1751 return count;
1754 /* ?get_allocator@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$allocator@D@2@XZ */
1755 /* ?get_allocator@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$allocator@D@2@XZ */
1756 DEFINE_THISCALL_WRAPPER(basic_string_char_get_allocator, 8)
1757 allocator* __thiscall basic_string_char_get_allocator(const basic_string_char *this, allocator *ret)
1759 TRACE("%p\n", this);
1760 return ret;
1763 static bool basic_string_wchar_inside(
1764 basic_string_wchar *this, const wchar_t *ptr)
1766 return ptr>=this->ptr && ptr<this->ptr+this->size;
1769 /* ?npos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@2IB */
1770 /* ?npos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@2_KB */
1771 const size_t MSVCP_basic_string_wchar_npos = -1;
1773 /* ?_C@?1??_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGXZ@4GB */
1774 /* ?_C@?1??_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGXZ@4GB */
1775 const wchar_t basic_string_wchar_nullbyte = '\0';
1777 /* ?_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGXZ */
1778 /* ?_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGXZ */
1779 const wchar_t* __cdecl basic_string_wchar__Nullstr(void)
1781 return &basic_string_wchar_nullbyte;
1784 /* ?_Refcnt@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEAAEPBG@Z */
1785 /* ?_Refcnt@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAAEAEPEBG@Z */
1786 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Refcnt, 8)
1787 unsigned short* __thiscall basic_string_wchar__Refcnt(basic_string_wchar *this, const wchar_t *ptr)
1789 TRACE("(%p %p)\n", this, ptr);
1790 return (unsigned short*)ptr-1;
1793 /* ?_Eos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXI@Z */
1794 /* ?_Eos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_K@Z */
1795 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Eos, 8)
1796 void __thiscall basic_string_wchar__Eos(basic_string_wchar *this, size_t len)
1798 this->size = len;
1799 this->ptr[len] = 0;
1802 /* ?clear@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
1803 /* ?clear@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
1804 /* ?clear@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
1805 /* ?clear@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
1806 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_clear, 4)
1807 void __thiscall MSVCP_basic_string_wchar_clear(basic_string_wchar *this)
1809 if(this->ptr)
1810 basic_string_wchar__Eos(this, 0);
1813 /* ?_Tidy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEX_N@Z */
1814 /* ?_Tidy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_N@Z */
1815 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Tidy, 8)
1816 void __thiscall basic_string_wchar__Tidy(basic_string_wchar *this, bool built)
1818 TRACE("(%p %d)\n", this, built);
1820 if(!built || !this->ptr);
1821 else if(!this->ptr[-1] || (unsigned short)this->ptr[-1]==FROZEN)
1822 MSVCP_allocator_wchar_deallocate(NULL, this->ptr-1, this->res+2);
1823 else
1824 this->ptr[-1]--;
1826 memset(this, 0, sizeof(*this));
1829 /* ?_Grow@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAE_NI_N@Z */
1830 /* ?_Grow@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAA_N_K_N@Z */
1831 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Grow, 12)
1832 bool __thiscall basic_string_wchar__Grow(basic_string_wchar *this, size_t new_size, bool trim)
1834 if(!new_size) {
1835 if(trim)
1836 basic_string_wchar__Tidy(this, TRUE);
1837 else if(this->ptr)
1838 basic_string_wchar__Eos(this, 0);
1839 } else if(this->res<new_size || trim ||
1840 (this->ptr && this->ptr[-1] && (unsigned short)this->ptr[-1]!=FROZEN)) {
1841 size_t new_res = new_size, len = this->size;
1842 wchar_t *ptr;
1844 if(!trim && this->ptr && !this->ptr[-1]) {
1845 new_res |= 0xf;
1846 if(new_res/3 < this->res/2)
1847 new_res = this->res + this->res/2;
1850 ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_res+2);
1851 if(!ptr) {
1852 new_res = new_size;
1853 ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_size+2);
1855 if(!ptr) {
1856 ERR("Out of memory\n");
1857 return FALSE;
1860 if(len > new_res)
1861 len = new_res;
1863 *ptr = 0;
1864 if(this->ptr)
1865 MSVCP_char_traits_wchar__Copy_s(ptr+1, new_size, this->ptr, len);
1866 basic_string_wchar__Tidy(this, TRUE);
1867 this->ptr = ptr+1;
1868 this->res = new_res;
1869 basic_string_wchar__Eos(this, len);
1872 return new_size>0;
1875 /* ?_Split@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXXZ */
1876 /* ?_Split@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAXXZ */
1877 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Split, 4)
1878 void __thiscall basic_string_wchar__Split(basic_string_wchar *this)
1880 size_t len;
1881 wchar_t *ptr;
1883 TRACE("(%p)\n", this);
1885 if(!this->ptr || !this->ptr[-1] || (unsigned short)this->ptr[-1]==FROZEN)
1886 return;
1888 ptr = this->ptr;
1889 len = this->size;
1890 basic_string_wchar__Tidy(this, TRUE);
1891 if(basic_string_wchar__Grow(this, len, FALSE)) {
1892 if(ptr)
1893 MSVCP_char_traits_wchar__Copy_s(this->ptr, this->res, ptr, len);
1894 basic_string_wchar__Eos(this, len);
1898 /* ?_Freeze@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXXZ */
1899 /* ?_Freeze@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAXXZ */
1900 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Freeze, 4)
1901 void __thiscall basic_string_wchar__Freeze(basic_string_wchar *this)
1903 TRACE("(%p)\n", this);
1904 basic_string_wchar__Split(this);
1905 if(this->ptr)
1906 this->ptr[-1] = FROZEN;
1909 /* ?_Copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXI@Z */
1910 /* ?_Copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_K@Z */
1911 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Copy, 8)
1912 void __thiscall basic_string_wchar__Copy(basic_string_wchar *this, size_t copy_len)
1914 TRACE("%p %Iu\n", this, copy_len);
1916 if(!basic_string_wchar__Grow(this, copy_len, TRUE))
1917 return;
1920 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPAGPAGI@Z */
1921 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEAGPEAG_K@Z */
1922 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGPBGI@Z */
1923 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGPEBG_K@Z */
1924 wchar_t* __cdecl basic_string_wchar__Psum(wchar_t *iter, size_t add)
1926 TRACE("(%p %Iu)\n", iter, add);
1927 return iter ? iter+add : iter;
1930 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@II@Z */
1931 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0@Z */
1932 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_erase, 12)
1933 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_erase(
1934 basic_string_wchar *this, size_t pos, size_t len)
1936 TRACE("%p %Iu %Iu\n", this, pos, len);
1938 if(pos > this->size)
1939 _Xran();
1941 if(len > this->size-pos)
1942 len = this->size-pos;
1944 if(len) {
1945 basic_string_wchar__Split(this);
1946 MSVCP_char_traits_wchar__Move_s(this->ptr+pos, this->res-pos,
1947 this->ptr+pos+len, this->size-pos-len);
1948 basic_string_wchar__Eos(this, this->size-len);
1951 return this;
1954 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAG@Z */
1955 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAG@Z */
1956 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase_beg, 8)
1957 wchar_t* __thiscall basic_string_wchar_erase_beg(basic_string_wchar *this, wchar_t *beg)
1959 size_t pos = beg-this->ptr;
1960 MSVCP_basic_string_wchar_erase(this, pos, 1);
1961 return this->ptr+pos;
1964 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@II@Z */
1965 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
1966 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_substr, 16)
1967 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_substr(
1968 basic_string_wchar *this, const basic_string_wchar *assign,
1969 size_t pos, size_t len)
1971 TRACE("%p %p %Iu %Iu\n", this, assign, pos, len);
1973 if(assign->size < pos)
1974 _Xran();
1976 if(len > assign->size-pos)
1977 len = assign->size-pos;
1979 if(this == assign) {
1980 MSVCP_basic_string_wchar_erase(this, pos+len, MSVCP_basic_string_wchar_npos);
1981 MSVCP_basic_string_wchar_erase(this, 0, pos);
1982 } else if(basic_string_wchar__Grow(this, len, FALSE)) {
1983 if(assign->ptr)
1984 MSVCP_char_traits_wchar__Copy_s(this->ptr, this->res,
1985 assign->ptr+pos, len);
1986 basic_string_wchar__Eos(this, len);
1989 return this;
1992 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBGI@Z */
1993 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG_K@Z */
1994 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_cstr_len, 12)
1995 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_cstr_len(
1996 basic_string_wchar *this, const wchar_t *str, size_t len)
1998 TRACE("%p %s %Iu\n", this, debugstr_wn(str, len), len);
2000 if(basic_string_wchar_inside(this, str))
2001 return MSVCP_basic_string_wchar_assign_substr(this, this, str-this->ptr, len);
2002 else if(basic_string_wchar__Grow(this, len, FALSE)) {
2003 MSVCP_char_traits_wchar__Copy_s(this->ptr, this->res, str, len);
2004 basic_string_wchar__Eos(this, len);
2007 return this;
2010 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@@Z */
2011 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@@Z */
2012 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@ABV01@@Z */
2013 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@AEBV01@@Z */
2014 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign, 8)
2015 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign(
2016 basic_string_wchar *this, const basic_string_wchar *assign)
2018 return MSVCP_basic_string_wchar_assign_substr(this, assign,
2019 0, MSVCP_basic_string_wchar_npos);
2022 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG@Z */
2023 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG@Z */
2024 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@PBG@Z */
2025 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@PEBG@Z */
2026 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_cstr, 8)
2027 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_cstr(
2028 basic_string_wchar *this, const wchar_t *str)
2030 return MSVCP_basic_string_wchar_assign_cstr_len(this, str,
2031 MSVCP_char_traits_wchar_length(str));
2034 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@G@Z */
2035 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@G@Z */
2036 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_ch, 8)
2037 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_ch(
2038 basic_string_wchar *this, wchar_t ch)
2040 return MSVCP_basic_string_wchar_assign_cstr_len(this, &ch, 1);
2043 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IG@Z */
2044 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KG@Z */
2045 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assignn, 12)
2046 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assignn(
2047 basic_string_wchar *this, size_t count, wchar_t ch)
2049 TRACE("%p %Iu %c\n", this, count, ch);
2051 basic_string_wchar__Grow(this, count, FALSE);
2052 MSVCP_char_traits_wchar_assignn(this->ptr, count, ch);
2053 basic_string_wchar__Eos(this, count);
2054 return this;
2057 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG0@Z */
2058 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG0@Z */
2059 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_ptr_ptr, 12)
2060 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_ptr_ptr(
2061 basic_string_wchar *this, const wchar_t *first, const wchar_t *last)
2063 return MSVCP_basic_string_wchar_assign_cstr_len(this, first, last-first);
2066 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBGIABV?$allocator@G@1@@Z */
2067 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG_KAEBV?$allocator@G@1@@Z */
2068 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_cstr_len_alloc, 16)
2069 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_len_alloc(
2070 basic_string_wchar *this, const wchar_t *str, size_t len, const void *alloc)
2072 TRACE("%p %s %Iu\n", this, debugstr_wn(str, len), len);
2074 basic_string_wchar__Tidy(this, FALSE);
2075 MSVCP_basic_string_wchar_assign_cstr_len(this, str, len);
2076 return this;
2079 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@PB_WI@Z */
2080 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@PEB_W_K@Z */
2081 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBGI@Z */
2082 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG_K@Z */
2083 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_cstr_len, 12)
2084 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_len(
2085 basic_string_wchar *this, const wchar_t *str, size_t len)
2087 return MSVCP_basic_string_wchar_ctor_cstr_len_alloc(this, str, len, NULL);
2090 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV01@IIABV?$allocator@G@1@@Z */
2091 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV01@_K1AEBV?$allocator@G@1@@Z */
2092 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_substr_alloc, 20)
2093 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_substr_alloc(
2094 basic_string_wchar *this, const basic_string_wchar *assign,
2095 size_t pos, size_t len, const void *alloc)
2097 TRACE("%p %p %Iu %Iu\n", this, assign, pos, len);
2099 basic_string_wchar__Tidy(this, FALSE);
2100 MSVCP_basic_string_wchar_assign_substr(this, assign, pos, len);
2101 return this;
2104 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBGABV?$allocator@G@1@@Z */
2105 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBGAEBV?$allocator@G@1@@Z */
2106 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_cstr_alloc, 12)
2107 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_alloc(
2108 basic_string_wchar *this, const wchar_t *str, const void *alloc)
2110 TRACE("%p %s\n", this, debugstr_w(str));
2112 basic_string_wchar__Tidy(this, FALSE);
2113 MSVCP_basic_string_wchar_assign_cstr(this, str);
2114 return this;
2117 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@PB_W@Z */
2118 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@PEB_W@Z */
2119 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBG@Z */
2120 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG@Z */
2121 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_cstr, 8)
2122 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr(
2123 basic_string_wchar *this, const wchar_t *str)
2125 return MSVCP_basic_string_wchar_ctor_cstr_alloc(this, str, NULL);
2128 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@IGABV?$allocator@G@1@@Z */
2129 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@_KGAEBV?$allocator@G@1@@Z */
2130 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_ch_alloc, 16)
2131 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_ch_alloc(basic_string_wchar *this,
2132 size_t count, wchar_t ch, const void *alloc)
2134 TRACE("%p %Iu %c\n", this, count, ch);
2136 basic_string_wchar__Tidy(this, FALSE);
2137 MSVCP_basic_string_wchar_assignn(this, count, ch);
2138 return this;
2141 /* ??_F?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
2142 /* ??_F?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
2143 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor, 4)
2144 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor(basic_string_wchar *this)
2146 TRACE("%p\n", this);
2148 basic_string_wchar__Tidy(this, FALSE);
2149 return this;
2152 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$allocator@G@1@@Z */
2153 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV?$allocator@G@1@@Z */
2154 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_alloc, 8)
2155 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_alloc(
2156 basic_string_wchar *this, const void *alloc)
2158 TRACE("%p %p\n", this, alloc);
2160 basic_string_wchar__Tidy(this, FALSE);
2161 return this;
2164 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV01@@Z */
2165 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV01@@Z */
2166 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_copy_ctor, 8)
2167 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_copy_ctor(
2168 basic_string_wchar *this, const basic_string_wchar *copy)
2170 TRACE("%p %p\n", this, copy);
2172 basic_string_wchar__Tidy(this, FALSE);
2173 MSVCP_basic_string_wchar_assign(this, copy);
2174 return this;
2177 /* ??1?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@XZ */
2178 /* ??1?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@XZ */
2179 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_dtor, 4)
2180 void __thiscall MSVCP_basic_string_wchar_dtor(basic_string_wchar *this)
2182 TRACE("%p\n", this);
2183 basic_string_wchar__Tidy(this, TRUE);
2186 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIPBGI@Z */
2187 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0PEBG0@Z */
2188 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_substr_cstr_len, 20)
2189 int __thiscall MSVCP_basic_string_wchar_compare_substr_cstr_len(
2190 const basic_string_wchar *this, size_t pos, size_t num,
2191 const wchar_t *str, size_t count)
2193 int ans;
2195 TRACE("%p %Iu %Iu %s %Iu\n", this, pos, num, debugstr_wn(str, count), count);
2197 if(this->size < pos)
2198 _Xran();
2200 if(num > this->size-pos)
2201 num = this->size-pos;
2203 ans = MSVCP_char_traits_wchar_compare(this->ptr+pos,
2204 str, num>count ? count : num);
2205 if(ans)
2206 return ans;
2208 if(num > count)
2209 ans = 1;
2210 else if(num < count)
2211 ans = -1;
2212 return ans;
2215 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHPBG@Z */
2216 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAHPEBG@Z */
2217 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_cstr, 8)
2218 int __thiscall MSVCP_basic_string_wchar_compare_cstr(
2219 const basic_string_wchar *this, const wchar_t *str)
2221 return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, 0, this->size,
2222 str, MSVCP_char_traits_wchar_length(str));
2225 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIABV12@II@Z */
2226 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0AEBV12@00@Z */
2227 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_substr_substr, 24)
2228 int __thiscall MSVCP_basic_string_wchar_compare_substr_substr(
2229 const basic_string_wchar *this, size_t pos, size_t num,
2230 const basic_string_wchar *compare, size_t off, size_t count)
2232 TRACE("%p %Iu %Iu %p %Iu %Iu\n", this, pos, num, compare, off, count);
2234 if(compare->size < off)
2235 _Xran();
2237 if(count > compare->size-off)
2238 count = compare->size-off;
2240 return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2241 compare->ptr+off, count);
2244 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIABV12@@Z */
2245 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0AEBV12@@Z */
2246 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_substr, 16)
2247 int __thiscall MSVCP_basic_string_wchar_compare_substr(
2248 const basic_string_wchar *this, size_t pos, size_t num,
2249 const basic_string_wchar *compare)
2251 return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2252 compare->ptr, compare->size);
2255 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHABV12@@Z */
2256 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAHAEBV12@@Z */
2257 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare, 8)
2258 int __thiscall MSVCP_basic_string_wchar_compare(
2259 const basic_string_wchar *this, const basic_string_wchar *compare)
2261 return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, 0, this->size,
2262 compare->ptr, compare->size);
2265 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIPBG@Z */
2266 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0PEBG@Z */
2267 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_substr_cstr, 16)
2268 int __thiscall MSVCP_basic_string_wchar_compare_substr_cstr(const basic_string_wchar *this,
2269 size_t pos, size_t num, const wchar_t *str)
2271 return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2272 str, MSVCP_char_traits_wchar_length(str));
2275 /* ??$?8GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2276 /* ??$?8GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2277 /* ??8std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2278 /* ??8std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2279 bool __cdecl MSVCP_basic_string_wchar_equal(
2280 const basic_string_wchar *left, const basic_string_wchar *right)
2282 return MSVCP_basic_string_wchar_compare(left, right) == 0;
2285 /* ??$?8GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2286 /* ??$?8GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2287 /* ??8std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2288 /* ??8std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2289 bool __cdecl MSVCP_basic_string_wchar_equal_str_cstr(
2290 const basic_string_wchar *left, const wchar_t *right)
2292 return MSVCP_basic_string_wchar_compare_cstr(left, right) == 0;
2295 /* ??$?8GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2296 /* ??$?8GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2297 /* ??8std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2298 /* ??8std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2299 bool __cdecl MSVCP_basic_string_wchar_equal_cstr_str(
2300 const wchar_t *left, const basic_string_wchar *right)
2302 return MSVCP_basic_string_wchar_compare_cstr(right, left) == 0;
2305 /* ??$?9GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2306 /* ??$?9GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2307 /* ??9std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2308 /* ??9std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2309 bool __cdecl MSVCP_basic_string_wchar_not_equal(
2310 const basic_string_wchar *left, const basic_string_wchar *right)
2312 return MSVCP_basic_string_wchar_compare(left, right) != 0;
2315 /* ??$?9GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2316 /* ??$?9GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2317 /* ??9std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2318 /* ??9std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2319 bool __cdecl MSVCP_basic_string_wchar_not_equal_str_cstr(
2320 const basic_string_wchar *left, const wchar_t *right)
2322 return MSVCP_basic_string_wchar_compare_cstr(left, right) != 0;
2325 /* ??$?9GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2326 /* ??$?9GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2327 /* ??9std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2328 /* ??9std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2329 bool __cdecl MSVCP_basic_string_wchar_not_equal_cstr_str(
2330 const wchar_t *left, const basic_string_wchar *right)
2332 return MSVCP_basic_string_wchar_compare_cstr(right, left) != 0;
2335 /* ??$?MGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2336 /* ??$?MGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2337 /* ??Mstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2338 /* ??Mstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2339 bool __cdecl MSVCP_basic_string_wchar_lower(
2340 const basic_string_wchar *left, const basic_string_wchar *right)
2342 return MSVCP_basic_string_wchar_compare(left, right) < 0;
2345 /* ??$?MGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2346 /* ??$?MGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2347 /* ??Mstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2348 /* ??Mstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2349 bool __cdecl MSVCP_basic_string_wchar_lower_bstr_cstr(
2350 const basic_string_wchar *left, const wchar_t *right)
2352 return MSVCP_basic_string_wchar_compare_cstr(left, right) < 0;
2355 /* ??$?MGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2356 /* ??$?MGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2357 /* ??Mstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2358 /* ??Mstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2359 bool __cdecl MSVCP_basic_string_wchar_lower_cstr_bstr(
2360 const wchar_t *left, const basic_string_wchar *right)
2362 return MSVCP_basic_string_wchar_compare_cstr(right, left) > 0;
2365 /* ??$?NGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2366 /* ??$?NGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2367 /* ??Nstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2368 /* ??Nstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2369 bool __cdecl MSVCP_basic_string_wchar_leq(
2370 const basic_string_wchar *left, const basic_string_wchar *right)
2372 return MSVCP_basic_string_wchar_compare(left, right) <= 0;
2375 /* ??$?NGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2376 /* ??$?NGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2377 /* ??Nstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2378 /* ??Nstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2379 bool __cdecl MSVCP_basic_string_wchar_leq_bstr_cstr(
2380 const basic_string_wchar *left, const wchar_t *right)
2382 return MSVCP_basic_string_wchar_compare_cstr(left, right) <= 0;
2385 /* ??$?NGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2386 /* ??$?NGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2387 /* ??Nstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2388 /* ??Nstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2389 bool __cdecl MSVCP_basic_string_wchar_leq_cstr_bstr(
2390 const wchar_t *left, const basic_string_wchar *right)
2392 return MSVCP_basic_string_wchar_compare_cstr(right, left) >= 0;
2395 /* ??$?OGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2396 /* ??$?OGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2397 /* ??Ostd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2398 /* ??Ostd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2399 bool __cdecl MSVCP_basic_string_wchar_greater(
2400 const basic_string_wchar *left, const basic_string_wchar *right)
2402 return MSVCP_basic_string_wchar_compare(left, right) > 0;
2405 /* ??$?OGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2406 /* ??$?OGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2407 /* ??Ostd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2408 /* ??Ostd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2409 bool __cdecl MSVCP_basic_string_wchar_greater_bstr_cstr(
2410 const basic_string_wchar *left, const wchar_t *right)
2412 return MSVCP_basic_string_wchar_compare_cstr(left, right) > 0;
2415 /* ??$?OGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2416 /* ??$?OGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2417 /* ??Ostd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2418 /* ??Ostd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2419 bool __cdecl MSVCP_basic_string_wchar_greater_cstr_bstr(
2420 const wchar_t *left, const basic_string_wchar *right)
2422 return MSVCP_basic_string_wchar_compare_cstr(right, left) < 0;
2425 /* ??$?PGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2426 /* ??$?PGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2427 /* ??Pstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2428 /* ??Pstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2429 bool __cdecl MSVCP_basic_string_wchar_geq(
2430 const basic_string_wchar *left, const basic_string_wchar *right)
2432 return MSVCP_basic_string_wchar_compare(left, right) >= 0;
2435 /* ??$?PGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2436 /* ??$?PGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2437 /* ??Pstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2438 /* ??Pstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2439 bool __cdecl MSVCP_basic_string_wchar_geq_bstr_cstr(
2440 const basic_string_wchar *left, const wchar_t *right)
2442 return MSVCP_basic_string_wchar_compare_cstr(left, right) >= 0;
2445 /* ??$?PGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2446 /* ??$?PGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2447 /* ??Pstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2448 /* ??Pstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2449 bool __cdecl MSVCP_basic_string_wchar_geq_cstr_bstr(
2450 const wchar_t *left, const basic_string_wchar *right)
2452 return MSVCP_basic_string_wchar_compare_cstr(right, left) <= 0;
2455 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2456 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2457 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_cstr_substr, 16)
2458 size_t __thiscall MSVCP_basic_string_wchar_find_cstr_substr(
2459 const basic_string_wchar *this, const wchar_t *find, size_t pos, size_t len)
2461 const wchar_t *p, *end;
2463 TRACE("%p %s %Iu %Iu\n", this, debugstr_wn(find, len), pos, len);
2465 if(len==0 && pos<=this->size)
2466 return pos;
2467 if(pos>=this->size || len>this->size)
2468 return MSVCP_basic_string_wchar_npos;
2470 end = this->ptr+this->size-len+1;
2471 for(p=this->ptr+pos; p<end; p++) {
2472 p = MSVCP_char_traits_wchar_find(p, end-p, find);
2473 if(!p)
2474 break;
2476 if(!MSVCP_char_traits_wchar_compare(p, find, len))
2477 return p-this->ptr;
2480 return MSVCP_basic_string_wchar_npos;
2483 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2484 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2485 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_off, 12)
2486 size_t __thiscall MSVCP_basic_string_wchar_find_off(
2487 const basic_string_wchar *this, const basic_string_wchar *find, size_t off)
2489 return MSVCP_basic_string_wchar_find_cstr_substr(this, find->ptr, off, find->size);
2492 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2493 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2494 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_ch, 12)
2495 size_t __thiscall MSVCP_basic_string_wchar_find_ch(
2496 const basic_string_wchar *this, wchar_t ch, size_t pos)
2498 return MSVCP_basic_string_wchar_find_cstr_substr(this, &ch, pos, 1);
2501 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2502 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2503 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_cstr_off, 12)
2504 size_t __thiscall MSVCP_basic_string_wchar_find_cstr_off(
2505 const basic_string_wchar *this, const wchar_t *find, size_t pos)
2507 return MSVCP_basic_string_wchar_find_cstr_substr(this, find, pos,
2508 MSVCP_char_traits_wchar_length(find));
2511 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2512 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2513 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_rfind_cstr_substr, 16)
2514 size_t __thiscall MSVCP_basic_string_wchar_rfind_cstr_substr(
2515 const basic_string_wchar *this, const wchar_t *find, size_t pos, size_t len)
2517 const wchar_t *p, *end;
2519 TRACE("%p %s %Iu %Iu\n", this, debugstr_wn(find, len), pos, len);
2521 if(len==0)
2522 return pos<this->size ? pos : this->size;
2524 if(len > this->size)
2525 return MSVCP_basic_string_wchar_npos;
2527 if(pos > this->size-len)
2528 pos = this->size-len;
2529 end = this->ptr;
2530 for(p=end+pos; p>=end; p--) {
2531 if(*p==*find && !MSVCP_char_traits_wchar_compare(p, find, len))
2532 return p-this->ptr;
2535 return MSVCP_basic_string_wchar_npos;
2538 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2539 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2540 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_rfind_off, 12)
2541 size_t __thiscall MSVCP_basic_string_wchar_rfind_off(
2542 const basic_string_wchar *this, const basic_string_wchar *find, size_t off)
2544 return MSVCP_basic_string_wchar_rfind_cstr_substr(this, find->ptr, off, find->size);
2547 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2548 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2549 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_rfind_ch, 12)
2550 size_t __thiscall MSVCP_basic_string_wchar_rfind_ch(
2551 const basic_string_wchar *this, wchar_t ch, size_t pos)
2553 return MSVCP_basic_string_wchar_rfind_cstr_substr(this, &ch, pos, 1);
2556 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2557 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2558 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_rfind_cstr_off, 12)
2559 size_t __thiscall MSVCP_basic_string_wchar_rfind_cstr_off(
2560 const basic_string_wchar *this, const wchar_t *find, size_t pos)
2562 return MSVCP_basic_string_wchar_rfind_cstr_substr(this, find, pos,
2563 MSVCP_char_traits_wchar_length(find));
2566 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2567 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2568 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_not_of_cstr_substr, 16)
2569 size_t __thiscall MSVCP_basic_string_wchar_find_first_not_of_cstr_substr(
2570 const basic_string_wchar *this, const wchar_t *find, size_t off, size_t len)
2572 const wchar_t *p, *end;
2574 TRACE("%p %p %Iu %Iu\n", this, find, off, len);
2576 if(off<this->size) {
2577 end = this->ptr+this->size;
2578 for(p=this->ptr+off; p<end; p++)
2579 if(!MSVCP_char_traits_wchar_find(find, len, p))
2580 return p-this->ptr;
2583 return MSVCP_basic_string_wchar_npos;
2586 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2587 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2588 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_not_of, 12)
2589 size_t __thiscall MSVCP_basic_string_wchar_find_first_not_of(
2590 const basic_string_wchar *this, const basic_string_wchar *find, size_t off)
2592 return MSVCP_basic_string_wchar_find_first_not_of_cstr_substr(this,
2593 find->ptr, off, find->size);
2596 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2597 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2598 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_not_of_ch, 12)
2599 size_t __thiscall MSVCP_basic_string_wchar_find_first_not_of_ch(
2600 const basic_string_wchar *this, wchar_t ch, size_t off)
2602 return MSVCP_basic_string_wchar_find_first_not_of_cstr_substr(this, &ch, off, 1);
2605 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2606 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2607 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_not_of_cstr, 12)
2608 size_t __thiscall MSVCP_basic_string_wchar_find_first_not_of_cstr(
2609 const basic_string_wchar *this, const wchar_t *find, size_t off)
2611 return MSVCP_basic_string_wchar_find_first_not_of_cstr_substr(
2612 this, find, off, MSVCP_char_traits_wchar_length(find));
2615 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2616 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2617 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_of_cstr_substr, 16)
2618 size_t __thiscall MSVCP_basic_string_wchar_find_first_of_cstr_substr(
2619 const basic_string_wchar *this, const wchar_t *find, size_t off, size_t len)
2621 const wchar_t *p, *end;
2623 TRACE("%p %p %Iu %Iu\n", this, find, off, len);
2625 if(len>0 && off<this->size) {
2626 end = this->ptr+this->size;
2627 for(p=this->ptr+off; p<end; p++)
2628 if(MSVCP_char_traits_wchar_find(find, len, p))
2629 return p-this->ptr;
2632 return MSVCP_basic_string_wchar_npos;
2635 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2636 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2637 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_of, 12)
2638 size_t __thiscall MSVCP_basic_string_wchar_find_first_of(
2639 const basic_string_wchar *this, const basic_string_wchar *find, size_t off)
2641 return MSVCP_basic_string_wchar_find_first_of_cstr_substr(this,
2642 find->ptr, off, find->size);
2645 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2646 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2647 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_of_ch, 12)
2648 size_t __thiscall MSVCP_basic_string_wchar_find_first_of_ch(
2649 const basic_string_wchar *this, wchar_t ch, size_t off)
2651 return MSVCP_basic_string_wchar_find_first_of_cstr_substr(this, &ch, off, 1);
2654 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2655 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2656 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_of_cstr, 12)
2657 size_t __thiscall MSVCP_basic_string_wchar_find_first_of_cstr(
2658 const basic_string_wchar *this, const wchar_t *find, size_t off)
2660 return MSVCP_basic_string_wchar_find_first_of_cstr_substr(
2661 this, find, off, MSVCP_char_traits_wchar_length(find));
2664 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2665 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2666 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_not_of_cstr_substr, 16)
2667 size_t __thiscall MSVCP_basic_string_wchar_find_last_not_of_cstr_substr(
2668 const basic_string_wchar *this, const wchar_t *find, size_t off, size_t len)
2670 const wchar_t *p, *beg;
2672 TRACE("%p %p %Iu %Iu\n", this, find, off, len);
2674 if(len>0 && this->size>0) {
2675 if(off >= this->size)
2676 off = this->size-1;
2678 beg = this->ptr;
2679 for(p=beg+off; p>=beg; p--)
2680 if(!MSVCP_char_traits_wchar_find(find, len, p))
2681 return p-beg;
2684 return MSVCP_basic_string_wchar_npos;
2687 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2688 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2689 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_not_of, 12)
2690 size_t __thiscall MSVCP_basic_string_wchar_find_last_not_of(
2691 const basic_string_wchar *this, const basic_string_wchar *find, size_t off)
2693 return MSVCP_basic_string_wchar_find_last_not_of_cstr_substr(this,
2694 find->ptr, off, find->size);
2697 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2698 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2699 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_not_of_ch, 12)
2700 size_t __thiscall MSVCP_basic_string_wchar_find_last_not_of_ch(
2701 const basic_string_wchar *this, wchar_t ch, size_t off)
2703 return MSVCP_basic_string_wchar_find_last_not_of_cstr_substr(this, &ch, off, 1);
2706 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2707 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2708 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_not_of_cstr, 12)
2709 size_t __thiscall MSVCP_basic_string_wchar_find_last_not_of_cstr(
2710 const basic_string_wchar *this, const wchar_t *find, size_t off)
2712 return MSVCP_basic_string_wchar_find_last_not_of_cstr_substr(
2713 this, find, off, MSVCP_char_traits_wchar_length(find));
2716 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2717 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2718 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_of_cstr_substr, 16)
2719 size_t __thiscall MSVCP_basic_string_wchar_find_last_of_cstr_substr(
2720 const basic_string_wchar *this, const wchar_t *find, size_t off, size_t len)
2722 const wchar_t *p, *beg;
2724 TRACE("%p %p %Iu %Iu\n", this, find, off, len);
2726 if(len>0 && this->size>0) {
2727 if(off >= this->size)
2728 off = this->size-1;
2730 beg = this->ptr;
2731 for(p=beg+off; p>=beg; p--)
2732 if(MSVCP_char_traits_wchar_find(find, len, p))
2733 return p-beg;
2736 return MSVCP_basic_string_wchar_npos;
2739 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2740 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2741 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_of, 12)
2742 size_t __thiscall MSVCP_basic_string_wchar_find_last_of(
2743 const basic_string_wchar *this, const basic_string_wchar *find, size_t off)
2745 return MSVCP_basic_string_wchar_find_last_of_cstr_substr(this,
2746 find->ptr, off, find->size);
2749 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2750 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2751 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_of_ch, 12)
2752 size_t __thiscall MSVCP_basic_string_wchar_find_last_of_ch(
2753 const basic_string_wchar *this, wchar_t ch, size_t off)
2755 return MSVCP_basic_string_wchar_find_last_of_cstr_substr(this, &ch, off, 1);
2758 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2759 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2760 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_of_cstr, 12)
2761 size_t __thiscall MSVCP_basic_string_wchar_find_last_of_cstr(
2762 const basic_string_wchar *this, const wchar_t *find, size_t off)
2764 return MSVCP_basic_string_wchar_find_last_of_cstr_substr(
2765 this, find, off, MSVCP_char_traits_wchar_length(find));
2768 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@II@Z */
2769 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
2770 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_substr, 16)
2771 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_substr(basic_string_wchar *this,
2772 const basic_string_wchar *append, size_t offset, size_t count)
2774 TRACE("%p %p %Iu %Iu\n", this, append, offset, count);
2776 if(append->size < offset)
2777 _Xran();
2779 if(count > append->size-offset)
2780 count = append->size-offset;
2782 if(MSVCP_basic_string_wchar_npos-this->size<=count || this->size+count<this->size)
2783 _Xlen();
2785 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2786 if(append->ptr)
2787 MSVCP_char_traits_wchar__Copy_s(this->ptr+this->size, this->res-this->size,
2788 append->ptr+offset, count);
2789 basic_string_wchar__Eos(this, this->size+count);
2792 return this;
2795 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBGI@Z */
2796 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG_K@Z */
2797 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_cstr_len, 12)
2798 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_cstr_len(
2799 basic_string_wchar *this, const wchar_t *append, size_t count)
2801 TRACE("%p %s %Iu\n", this, debugstr_wn(append, count), count);
2803 if(basic_string_wchar_inside(this, append))
2804 return MSVCP_basic_string_wchar_append_substr(this, this, append-this->ptr, count);
2806 if(MSVCP_basic_string_wchar_npos-this->size<=count || this->size+count<this->size)
2807 _Xlen();
2809 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2810 MSVCP_char_traits_wchar__Copy_s(this->ptr+this->size,
2811 this->res-this->size, append, count);
2812 basic_string_wchar__Eos(this, this->size+count);
2815 return this;
2818 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IG@Z */
2819 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KG@Z */
2820 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_len_ch, 12)
2821 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_len_ch(
2822 basic_string_wchar *this, size_t count, wchar_t ch)
2824 TRACE("%p %Iu %c\n", this, count, ch);
2826 if(MSVCP_basic_string_wchar_npos-this->size <= count)
2827 _Xlen();
2829 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2830 MSVCP_char_traits_wchar_assignn(this->ptr+this->size, count, ch);
2831 basic_string_wchar__Eos(this, this->size+count);
2834 return this;
2837 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@@Z */
2838 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@@Z */
2839 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@ABV01@@Z */
2840 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@AEBV01@@Z */
2841 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append, 8)
2842 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append(
2843 basic_string_wchar *this, const basic_string_wchar *append)
2845 return MSVCP_basic_string_wchar_append_substr(this, append,
2846 0, MSVCP_basic_string_wchar_npos);
2849 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@G@Z */
2850 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@G@Z */
2851 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_ch, 8)
2852 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_ch(
2853 basic_string_wchar *this, wchar_t ch)
2855 return MSVCP_basic_string_wchar_append_len_ch(this, 1, ch);
2858 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG0@Z */
2859 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG0@Z */
2860 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_beg_end, 12)
2861 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_beg_end(
2862 basic_string_wchar *this, const wchar_t *beg, const wchar_t *end)
2864 return MSVCP_basic_string_wchar_append_cstr_len(this, beg, end-beg);
2867 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG@Z */
2868 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG@Z */
2869 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@PBG@Z */
2870 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@PEBG@Z */
2871 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_cstr, 8)
2872 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_cstr(
2873 basic_string_wchar *this, const wchar_t *append)
2875 return MSVCP_basic_string_wchar_append_cstr_len(this, append,
2876 MSVCP_char_traits_wchar_length(append));
2878 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@0@Z */
2879 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@0@Z */
2880 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@0@Z */
2881 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@0@Z */
2882 basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate(basic_string_wchar *ret,
2883 const basic_string_wchar *left, const basic_string_wchar *right)
2885 TRACE("%p %p\n", left, right);
2887 MSVCP_basic_string_wchar_copy_ctor(ret, left);
2888 MSVCP_basic_string_wchar_append(ret, right);
2889 return ret;
2892 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@G@Z */
2893 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@G@Z */
2894 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@G@Z */
2895 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@G@Z */
2896 basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate_bstr_ch(basic_string_wchar *ret,
2897 const basic_string_wchar *left, wchar_t right)
2899 TRACE("%p %c\n", left, right);
2901 MSVCP_basic_string_wchar_copy_ctor(ret, left);
2902 MSVCP_basic_string_wchar_append_ch(ret, right);
2903 return ret;
2906 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@PBG@Z */
2907 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@PEBG@Z */
2908 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@PBG@Z */
2909 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@PEBG@Z */
2910 basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate_bstr_cstr(basic_string_wchar *ret,
2911 const basic_string_wchar *left, const wchar_t *right)
2913 TRACE("%p %s\n", left, debugstr_w(right));
2915 MSVCP_basic_string_wchar_copy_ctor(ret, left);
2916 MSVCP_basic_string_wchar_append_cstr(ret, right);
2917 return ret;
2920 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GABV10@@Z */
2921 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GAEBV10@@Z */
2922 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GABV10@@Z */
2923 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GAEBV10@@Z */
2924 basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate_ch_bstr(basic_string_wchar *ret,
2925 wchar_t left, const basic_string_wchar *right)
2927 TRACE("%c %p\n", left, right);
2929 MSVCP_basic_string_wchar_ctor_cstr_len_alloc(ret, &left, 1, NULL);
2930 MSVCP_basic_string_wchar_append(ret, right);
2931 return ret;
2934 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBGABV10@@Z */
2935 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBGAEBV10@@Z */
2936 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBGABV10@@Z */
2937 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBGAEBV10@@Z */
2938 basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate_cstr_bstr(basic_string_wchar *ret,
2939 const wchar_t *left, const basic_string_wchar *right)
2941 TRACE("%s %p\n", debugstr_w(left), right);
2943 MSVCP_basic_string_wchar_ctor_cstr_alloc(ret, left, NULL);
2944 MSVCP_basic_string_wchar_append(ret, right);
2945 return ret;
2948 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGI@Z */
2949 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAG_K@Z */
2950 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_operator_at, 8)
2951 wchar_t* __thiscall MSVCP_basic_string_wchar_operator_at(
2952 basic_string_wchar *this, size_t pos)
2954 TRACE("%p %Iu\n", this, pos);
2956 if(!this->ptr || pos>this->size)
2957 return (wchar_t*)basic_string_wchar__Nullstr();
2959 basic_string_wchar__Freeze(this);
2960 return this->ptr+pos;
2963 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEABGI@Z */
2964 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAAEBG_K@Z */
2965 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_operator_at_const, 8)
2966 const wchar_t* __thiscall MSVCP_basic_string_wchar_operator_at_const(
2967 const basic_string_wchar *this, size_t pos)
2969 TRACE("%p %Iu\n", this, pos);
2971 if(!this->ptr)
2972 return basic_string_wchar__Nullstr();
2973 return this->ptr+pos;
2976 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGI@Z */
2977 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAG_K@Z */
2978 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEABGI@Z */
2979 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAAEBG_K@Z */
2980 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_at, 8)
2981 wchar_t* __thiscall MSVCP_basic_string_wchar_at(
2982 basic_string_wchar *this, size_t pos)
2984 TRACE("%p %Iu\n", this, pos);
2986 if(this->size <= pos)
2987 _Xran();
2989 return this->ptr+pos;
2992 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIPBGI@Z */
2993 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG0@Z */
2994 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_cstr_len, 20)
2995 basic_string_wchar* __thiscall basic_string_wchar_replace_cstr_len(basic_string_wchar *this,
2996 size_t off, size_t len, const wchar_t *str, size_t str_len)
2998 size_t inside_pos = -1;
2999 wchar_t *ptr = this->ptr;
3001 TRACE("%p %Iu %Iu %p %Iu\n", this, off, len, str, str_len);
3003 if(this->size < off)
3004 _Xran();
3006 if(len > this->size-off)
3007 len = this->size-off;
3009 if(MSVCP_basic_string_wchar_npos-str_len <= this->size-len)
3010 _Xlen();
3012 if(basic_string_wchar_inside(this, str))
3013 inside_pos = str-ptr;
3015 if(this->size-len+str_len)
3016 basic_string_wchar__Grow(this, this->size-len+str_len, FALSE);
3017 ptr = this->ptr;
3019 if(inside_pos == -1) {
3020 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3021 memcpy(ptr+off, str, str_len*sizeof(char));
3022 } else if(len >= str_len) {
3023 memmove(ptr+off, ptr+inside_pos, str_len*sizeof(char));
3024 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3025 } else {
3026 size_t size;
3028 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3030 if(inside_pos < off+len) {
3031 size = off+len-inside_pos;
3032 if(size > str_len)
3033 size = str_len;
3034 memmove(ptr+off, ptr+inside_pos, size*sizeof(char));
3035 } else {
3036 size = 0;
3039 if(str_len > size)
3040 memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(char));
3043 if(this->ptr)
3044 basic_string_wchar__Eos(this, this->size-len+str_len);
3045 return this;
3048 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@II@Z */
3049 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0AEBV12@00@Z */
3050 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_substr, 24)
3051 basic_string_wchar* __thiscall basic_string_wchar_replace_substr(basic_string_wchar *this, size_t off,
3052 size_t len, const basic_string_wchar *str, size_t str_off, size_t str_len)
3054 if(str->size < str_off)
3055 _Xran();
3057 if(str_len > str->size-str_off)
3058 str_len = str->size-str_off;
3060 return basic_string_wchar_replace_cstr_len(this, off, len,
3061 str->ptr+str_off, str_len);
3064 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@@Z */
3065 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0AEBV12@@Z */
3066 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace, 16)
3067 basic_string_wchar* __thiscall basic_string_wchar_replace(basic_string_wchar *this,
3068 size_t off, size_t len, const basic_string_wchar *str)
3070 return basic_string_wchar_replace_cstr_len(this, off, len,
3071 str->ptr, str->size);
3074 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIIG@Z */
3075 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K00G@Z */
3076 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_ch, 20)
3077 basic_string_wchar* __thiscall basic_string_wchar_replace_ch(basic_string_wchar *this,
3078 size_t off, size_t len, size_t count, wchar_t ch)
3080 wchar_t *ptr;
3082 TRACE("%p %Iu %Iu %Iu %c\n", this, off, len, count, ch);
3084 if(this->size < off)
3085 _Xran();
3087 if(len > this->size-off)
3088 len = this->size-off;
3090 if(MSVCP_basic_string_wchar_npos-count <= this->size-len)
3091 _Xlen();
3093 if(this->size-len+count)
3094 basic_string_wchar__Grow(this, this->size-len+count, FALSE);
3095 ptr = this->ptr;
3097 memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(char));
3098 MSVCP_char_traits_wchar_assignn(ptr+off, count, ch);
3099 basic_string_wchar__Eos(this, this->size-len+count);
3101 return this;
3104 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIPBG@Z */
3105 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG@Z */
3106 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_cstr, 16)
3107 basic_string_wchar* __thiscall basic_string_wchar_replace_cstr(basic_string_wchar *this,
3108 size_t off, size_t len, const wchar_t *str)
3110 return basic_string_wchar_replace_cstr_len(this, off, len, str,
3111 MSVCP_char_traits_wchar_length(str));
3114 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IABV12@@Z */
3115 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KAEBV12@@Z */
3116 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert, 12)
3117 basic_string_wchar* __thiscall basic_string_wchar_insert(basic_string_wchar *this,
3118 size_t off, const basic_string_wchar *str)
3120 return basic_string_wchar_replace(this, off, 0, str);
3123 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IABV12@II@Z */
3124 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KAEBV12@00@Z */
3125 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_substr, 20)
3126 basic_string_wchar* __thiscall basic_string_wchar_insert_substr(
3127 basic_string_wchar *this, size_t off, const basic_string_wchar *str,
3128 size_t str_off, size_t str_count)
3130 return basic_string_wchar_replace_substr(this, off, 0, str, str_off, str_count);
3133 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IPBG@Z */
3134 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KPEBG@Z */
3135 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_cstr, 12)
3136 basic_string_wchar* __thiscall basic_string_wchar_insert_cstr(
3137 basic_string_wchar *this, size_t off, const wchar_t *str)
3139 return basic_string_wchar_replace_cstr(this, off, 0, str);
3142 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IPBGI@Z */
3143 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KPEBG0@Z */
3144 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_cstr_len, 16)
3145 basic_string_wchar* __thiscall basic_string_wchar_insert_cstr_len(basic_string_wchar *this,
3146 size_t off, const wchar_t *str, size_t str_len)
3148 return basic_string_wchar_replace_cstr_len(this, off, 0, str, str_len);
3151 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIG@Z */
3152 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0G@Z */
3153 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_chn, 16)
3154 basic_string_wchar* __thiscall basic_string_wchar_insert_chn(basic_string_wchar *this,
3155 size_t off, size_t count, wchar_t ch)
3157 return basic_string_wchar_replace_ch(this, off, 0, count, ch);
3160 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXIG@Z */
3161 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_KG@Z */
3162 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_resize_ch, 12)
3163 void __thiscall MSVCP_basic_string_wchar_resize_ch(
3164 basic_string_wchar *this, size_t size, wchar_t ch)
3166 TRACE("%p %Iu %c\n", this, size, ch);
3168 if(size <= this->size)
3169 MSVCP_basic_string_wchar_erase(this, size, this->size);
3170 else
3171 MSVCP_basic_string_wchar_append_len_ch(this, size-this->size, ch);
3174 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXI@Z */
3175 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_K@Z */
3176 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_resize, 8)
3177 void __thiscall MSVCP_basic_string_wchar_resize(
3178 basic_string_wchar *this, size_t size)
3180 MSVCP_basic_string_wchar_resize_ch(this, size, '\0');
3183 /* ?c_str@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3184 /* ?c_str@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3185 /* ?data@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3186 /* ?data@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3187 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_c_str, 4)
3188 const wchar_t* __thiscall MSVCP_basic_string_wchar_c_str(const basic_string_wchar *this)
3190 TRACE("%p\n", this);
3191 return this->ptr ? this->ptr : basic_string_wchar__Nullstr();
3194 /* ?size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3195 /* ?size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3196 /* ?length@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3197 /* ?length@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3198 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_length, 4)
3199 size_t __thiscall MSVCP_basic_string_wchar_length(const basic_string_wchar *this)
3201 TRACE("%p\n", this);
3202 return this->size;
3205 /* ?max_size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3206 /* ?max_size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3207 DEFINE_THISCALL_WRAPPER(basic_string_wchar_max_size, 4)
3208 size_t __thiscall basic_string_wchar_max_size(const basic_string_wchar *this)
3210 TRACE("%p\n", this);
3211 return MSVCP_allocator_wchar_max_size(NULL)-1;
3214 /* ?capacity@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3215 /* ?capacity@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3216 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_capacity, 4)
3217 size_t __thiscall MSVCP_basic_string_wchar_capacity(basic_string_wchar *this)
3219 TRACE("%p\n", this);
3220 return this->res;
3223 /* ?reserve@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXI@Z */
3224 /* ?reserve@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_K@Z */
3225 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_reserve, 8)
3226 void __thiscall MSVCP_basic_string_wchar_reserve(basic_string_wchar *this, size_t size)
3228 size_t len;
3230 TRACE("%p %Iu\n", this, size);
3232 len = this->size;
3233 if(len > size)
3234 return;
3236 if(basic_string_wchar__Grow(this, size, FALSE))
3237 basic_string_wchar__Eos(this, len);
3240 /* ?empty@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE_NXZ */
3241 /* ?empty@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_NXZ */
3242 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_empty, 4)
3243 bool __thiscall MSVCP_basic_string_wchar_empty(basic_string_wchar *this)
3245 TRACE("%p\n", this);
3246 return this->size == 0;
3249 /* ?swap@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXAAV12@@Z */
3250 /* ?swap@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXAEAV12@@Z */
3251 DEFINE_THISCALL_WRAPPER(basic_string_wchar_swap, 8)
3252 void __thiscall basic_string_wchar_swap(basic_string_wchar *this, basic_string_wchar *str)
3254 basic_string_wchar tmp;
3255 TRACE("%p %p\n", this, str);
3257 tmp = *this;
3258 *this = *str;
3259 *str = tmp;
3262 /* ?substr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV12@II@Z */
3263 /* ?substr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV12@_K0@Z */
3264 DEFINE_THISCALL_WRAPPER(basic_string_wchar_substr, 16)
3265 basic_string_wchar* __thiscall basic_string_wchar_substr(basic_string_wchar *this,
3266 basic_string_wchar *ret, size_t off, size_t len)
3268 TRACE("%p %Iu %Iu\n", this, off, len);
3270 MSVCP_basic_string_wchar_ctor_substr_alloc(ret, this, off, len, NULL);
3271 return ret;
3274 /* ?copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPAGII@Z */
3275 /* ?copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEAG_K1@Z */
3276 DEFINE_THISCALL_WRAPPER(basic_string_wchar_copy, 16)
3277 size_t __thiscall basic_string_wchar_copy(const basic_string_wchar *this,
3278 wchar_t *dest, size_t count, size_t off)
3280 TRACE("%p %p %Iu %Iu\n", this, dest, count, off);
3282 if(off > this->size)
3283 _Xran();
3284 if(count > this->size-off)
3285 count = this->size-off;
3286 if(this->ptr)
3287 MSVCP_char_traits_wchar__Copy_s(dest, count, this->ptr+off, count);
3288 return count;
3291 /* ?get_allocator@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$allocator@G@2@XZ */
3292 /* ?get_allocator@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$allocator@G@2@XZ */
3293 DEFINE_THISCALL_WRAPPER(basic_string_wchar_get_allocator, 8)
3294 allocator* __thiscall basic_string_wchar_get_allocator(const basic_string_wchar *this, allocator *ret)
3296 TRACE("%p\n", this);
3297 return ret;
3300 /* Old iterator functions */
3302 /* ?_Pdif@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAIPBD0@Z */
3303 /* ?_Pdif@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CA_KPEBD0@Z */
3304 size_t __cdecl basic_string_char__Pdif(const char *i1, const char *i2)
3306 TRACE("(%p %p)\n", i1, i2);
3307 return !i1 ? 0 : i1-i2;
3310 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPAD0@Z */
3311 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEAD0@Z */
3312 DEFINE_THISCALL_WRAPPER(basic_string_char_erase_iter, 12)
3313 char* __thiscall basic_string_char_erase_iter(basic_string_char *this, char *beg, char *end)
3315 size_t pos = basic_string_char__Pdif(beg, this->ptr);
3316 MSVCP_basic_string_char_erase(this, pos, basic_string_char__Pdif(end, beg));
3317 return basic_string_char__Psum(this->ptr, pos);
3320 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBD1@Z */
3321 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD1@Z */
3322 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_iter, 20)
3323 basic_string_char* __thiscall basic_string_char_replace_iter_iter(basic_string_char *this,
3324 char *beg1, char *end1, const char *beg2, const char *end2)
3326 return basic_string_char_replace_cstr_len(this, basic_string_char__Pdif(beg1, this->ptr),
3327 basic_string_char__Pdif(end1, beg1), beg2, basic_string_char__Pdif(end2, beg2));
3330 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0ABV12@@Z */
3331 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0AEBV12@@Z */
3332 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_bstr, 16)
3333 basic_string_char* __thiscall basic_string_char_replace_iter_bstr(basic_string_char *this,
3334 char *beg, char *end, const basic_string_char *str)
3336 return basic_string_char_replace(this, basic_string_char__Pdif(beg, this->ptr),
3337 basic_string_char__Pdif(end, beg), str);
3340 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0ID@Z */
3341 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0_KD@Z */
3342 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_chn, 20)
3343 basic_string_char* __thiscall basic_string_char_replace_iter_chn(basic_string_char *this,
3344 char *beg, char *end, size_t count, char ch)
3346 return basic_string_char_replace_ch(this, basic_string_char__Pdif(beg, this->ptr),
3347 basic_string_char__Pdif(end, beg), count, ch);
3350 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBD@Z */
3351 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD@Z */
3352 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr, 16)
3353 basic_string_char* __thiscall basic_string_char_replace_iter_cstr(basic_string_char *this,
3354 char *beg, char *end, const char *str)
3356 return basic_string_char_replace_cstr(this, basic_string_char__Pdif(beg, this->ptr),
3357 basic_string_char__Pdif(end, beg), str);
3360 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBDI@Z */
3361 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD_K@Z */
3362 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr_len, 20)
3363 basic_string_char* __thiscall basic_string_char_replace_iter_cstr_len(basic_string_char *this,
3364 char *beg, char *end, const char *str, size_t len)
3366 return basic_string_char_replace_cstr_len(this, basic_string_char__Pdif(beg, this->ptr),
3367 basic_string_char__Pdif(end, beg), str, len);
3370 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXPADID@Z */
3371 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXPEAD_KD@Z */
3372 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter_chn, 16)
3373 void __thiscall basic_string_char_insert_iter_chn(basic_string_char *this,
3374 char *pos, size_t n, char ch)
3376 basic_string_char_insert_chn(this, basic_string_char__Pdif(pos, this->ptr), n, ch);
3379 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPADD@Z */
3380 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEADD@Z */
3381 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter_ch, 12)
3382 char* __thiscall basic_string_char_insert_iter_ch(basic_string_char *this, char *pos, char ch)
3384 size_t off = basic_string_char__Pdif(pos, this->ptr);
3385 basic_string_char_insert_chn(this, off, 1, ch);
3386 return basic_string_char__Psum(this->ptr, off);
3389 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADXZ */
3390 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADXZ */
3391 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
3392 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
3393 DEFINE_THISCALL_WRAPPER(basic_string_char_begin, 4)
3394 char* __thiscall basic_string_char_begin(basic_string_char *this)
3396 TRACE("(%p)\n", this);
3397 basic_string_char__Freeze(this);
3398 return this->ptr;
3401 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADXZ */
3402 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADXZ */
3403 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
3404 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
3405 DEFINE_THISCALL_WRAPPER(basic_string_char_end, 4)
3406 char* __thiscall basic_string_char_end(basic_string_char *this)
3408 TRACE("(%p)\n", this);
3409 basic_string_char__Freeze(this);
3410 return this->ptr+this->size;
3413 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@PADDAADPADH@2@XZ */
3414 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@PEADDAEADPEAD_J@2@XZ */
3415 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@PBDDABDPBDH@2@XZ */
3416 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@PEBDDAEBDPEBD_J@2@XZ */
3417 DEFINE_THISCALL_WRAPPER(basic_string_char_rbegin, 8)
3418 String_reverse_iterator_char* __thiscall basic_string_char_rbegin(
3419 basic_string_char *this, String_reverse_iterator_char *ret)
3421 TRACE("(%p %p)\n", this, ret);
3422 ret->ptr = basic_string_char_end(this);
3423 return ret;
3426 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@PADDAADPADH@2@XZ */
3427 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@PEADDAEADPEAD_J@2@XZ */
3428 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@PBDDABDPBDH@2@XZ */
3429 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@PEBDDAEBDPEBD_J@2@XZ */
3430 DEFINE_THISCALL_WRAPPER(basic_string_char_rend, 8)
3431 String_reverse_iterator_char* __thiscall basic_string_char_rend(
3432 basic_string_char *this, String_reverse_iterator_char *ret)
3434 TRACE("(%p %p)\n", this, ret);
3435 ret->ptr = basic_string_char_begin(this);
3436 return ret;
3439 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD0ABV?$allocator@D@1@@Z */
3440 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD0AEBV?$allocator@D@1@@Z */
3441 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_iter, 16)
3442 basic_string_char* __thiscall basic_string_char_ctor_iter(basic_string_char *this,
3443 const char *first, const char *last, allocator *alloc)
3445 TRACE("(%p %p %p %p)\n", this, first, last, alloc);
3447 basic_string_char__Tidy(this, FALSE);
3448 MSVCP_basic_string_char_assign_cstr_len(this, first, basic_string_char__Pdif(last, first));
3449 return this;
3452 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXPADPBD1@Z */
3453 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXPEADPEBD1@Z */
3454 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter, 16)
3455 void __thiscall basic_string_char_insert_iter(basic_string_char *this,
3456 char *pos, const char *beg, const char *end)
3458 basic_string_char_insert_cstr_len(this, basic_string_char__Pdif(pos, this->ptr),
3459 beg, basic_string_char__Pdif(end, beg));
3462 /* ?_Pdif@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAIPBG0@Z */
3463 /* ?_Pdif@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CA_KPEBG0@Z */
3464 size_t __cdecl basic_string_wchar__Pdif(const wchar_t *i1, const wchar_t *i2)
3466 TRACE("(%p %p)\n", i1, i2);
3467 return !i1 ? 0 : i1-i2;
3470 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAG0@Z */
3471 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAG0@Z */
3472 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase_iter, 12)
3473 wchar_t* __thiscall basic_string_wchar_erase_iter(basic_string_wchar *this, wchar_t *beg, wchar_t *end)
3475 size_t pos = basic_string_wchar__Pdif(beg, this->ptr);
3476 MSVCP_basic_string_wchar_erase(this, pos, basic_string_wchar__Pdif(end, beg));
3477 return basic_string_wchar__Psum(this->ptr, pos);
3480 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBG0ABV?$allocator@G@1@@Z */
3481 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG0AEBV?$allocator@G@1@@Z */
3482 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_iter, 16)
3483 basic_string_wchar* __thiscall basic_string_wchar_ctor_iter(basic_string_wchar *this,
3484 const wchar_t *first, const wchar_t *last, allocator *alloc)
3486 TRACE("(%p %p %p %p)\n", this, first, last, alloc);
3488 basic_string_wchar__Tidy(this, FALSE);
3489 MSVCP_basic_string_wchar_assign_cstr_len(this, first, basic_string_wchar__Pdif(last, first));
3490 return this;
3493 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBG1@Z */
3494 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG1@Z */
3495 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_iter, 20)
3496 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_iter(basic_string_wchar *this,
3497 wchar_t *beg1, wchar_t *end1, const wchar_t *beg2, const wchar_t *end2)
3499 return basic_string_wchar_replace_cstr_len(this, basic_string_wchar__Pdif(beg1, this->ptr),
3500 basic_string_wchar__Pdif(end1, beg1), beg2, basic_string_wchar__Pdif(end2, beg2));
3503 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0ABV12@@Z */
3504 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0AEBV12@@Z */
3505 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_bstr, 16)
3506 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_bstr(basic_string_wchar *this,
3507 wchar_t *beg, wchar_t *end, const basic_string_wchar *str)
3509 return basic_string_wchar_replace(this, basic_string_wchar__Pdif(beg, this->ptr),
3510 basic_string_wchar__Pdif(end, beg), str);
3513 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0IG@Z */
3514 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0_KG@Z */
3515 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_chn, 20)
3516 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_chn(basic_string_wchar *this,
3517 wchar_t *beg, wchar_t *end, size_t count, wchar_t ch)
3519 return basic_string_wchar_replace_ch(this, basic_string_wchar__Pdif(beg, this->ptr),
3520 basic_string_wchar__Pdif(end, beg), count, ch);
3523 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBG@Z */
3524 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG@Z */
3525 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr, 16)
3526 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr(basic_string_wchar *this,
3527 wchar_t *beg, wchar_t *end, const wchar_t *str)
3529 return basic_string_wchar_replace_cstr(this, basic_string_wchar__Pdif(beg, this->ptr),
3530 basic_string_wchar__Pdif(end, beg), str);
3533 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBGI@Z */
3534 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG_K@Z */
3535 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr_len, 20)
3536 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr_len(basic_string_wchar *this,
3537 wchar_t *beg, wchar_t *end, const wchar_t *str, size_t len)
3539 return basic_string_wchar_replace_cstr_len(this, basic_string_wchar__Pdif(beg, this->ptr),
3540 basic_string_wchar__Pdif(end, beg), str, len);
3543 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXPAGIG@Z */
3544 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXPEAG_KG@Z */
3545 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter_chn, 16)
3546 void __thiscall basic_string_wchar_insert_iter_chn(basic_string_wchar *this,
3547 wchar_t *pos, size_t n, wchar_t ch)
3549 basic_string_wchar_insert_chn(this, basic_string_wchar__Pdif(pos, this->ptr), n, ch);
3552 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAGG@Z */
3553 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAGG@Z */
3554 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter_ch, 12)
3555 wchar_t* __thiscall basic_string_wchar_insert_iter_ch(basic_string_wchar *this, wchar_t *pos, wchar_t ch)
3557 size_t off = basic_string_wchar__Pdif(pos, this->ptr);
3558 basic_string_wchar_insert_chn(this, off, 1, ch);
3559 return basic_string_wchar__Psum(this->ptr, off);
3562 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGXZ */
3563 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGXZ */
3564 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3565 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3566 DEFINE_THISCALL_WRAPPER(basic_string_wchar_begin, 4)
3567 wchar_t* __thiscall basic_string_wchar_begin(basic_string_wchar *this)
3569 TRACE("(%p)\n", this);
3570 basic_string_wchar__Freeze(this);
3571 return this->ptr;
3574 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGXZ */
3575 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGXZ */
3576 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3577 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3578 DEFINE_THISCALL_WRAPPER(basic_string_wchar_end, 4)
3579 wchar_t* __thiscall basic_string_wchar_end(basic_string_wchar *this)
3581 TRACE("(%p)\n", this);
3582 basic_string_wchar__Freeze(this);
3583 return this->ptr+this->size;
3586 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@PAGGAAGPAGH@2@XZ */
3587 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@PEAGGAEAGPEAG_J@2@XZ */
3588 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@PBGGABGPBGH@2@XZ */
3589 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@PEBGGAEBGPEBG_J@2@XZ */
3590 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rbegin, 8)
3591 String_reverse_iterator_wchar* __thiscall basic_string_wchar_rbegin(
3592 basic_string_wchar *this, String_reverse_iterator_wchar *ret)
3594 TRACE("(%p %p)\n", this, ret);
3595 ret->ptr = basic_string_wchar_end(this);
3596 return ret;
3599 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@PAGGAAGPAGH@2@XZ */
3600 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@PEAGGAEAGPEAG_J@2@XZ */
3601 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@PBGGABGPBGH@2@XZ */
3602 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@PEBGGAEBGPEBG_J@2@XZ */
3603 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rend, 8)
3604 String_reverse_iterator_wchar* __thiscall basic_string_wchar_rend(
3605 basic_string_wchar *this, String_reverse_iterator_wchar *ret)
3607 TRACE("(%p %p)\n", this, ret);
3608 ret->ptr = basic_string_wchar_begin(this);
3609 return ret;
3612 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXPAGPBG1@Z */
3613 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXPEAGPEBG1@Z */
3614 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter, 16)
3615 void __thiscall basic_string_wchar_insert_iter(basic_string_wchar *this,
3616 wchar_t *pos, const wchar_t *beg, const wchar_t *end)
3618 basic_string_wchar_insert_cstr_len(this, basic_string_wchar__Pdif(pos, this->ptr),
3619 beg, basic_string_wchar__Pdif(end, beg));