2 * Copyright 2010 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
29 #include "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(msvcp90);
32 /* _String_iterator<char> and _String_const_iterator<char> class */
34 basic_string_char *bstr;
36 } String_iterator_char;
37 typedef String_iterator_char String_reverse_iterator_char;
40 basic_string_wchar *bstr;
42 } String_iterator_wchar;
43 typedef String_iterator_wchar String_reverse_iterator_wchar;
45 /* size_t_noverify structure */
54 /* char_traits<char> */
55 /* ?assign@?$char_traits@D@std@@SAXAADABD@Z */
56 /* ?assign@?$char_traits@D@std@@SAXAEADAEBD@Z */
57 void CDECL MSVCP_char_traits_char_assign(char *ch, const char *assign)
62 /* ?eq@?$char_traits@D@std@@SA_NABD0@Z */
63 /* ?eq@?$char_traits@D@std@@SA_NAEBD0@Z */
64 MSVCP_bool CDECL MSVCP_char_traits_char_eq(const char *ch1, const char *ch2)
69 /* ?lt@?$char_traits@D@std@@SA_NABD0@Z */
70 /* ?lt@?$char_traits@D@std@@SA_NAEBD0@Z */
71 MSVCP_bool CDECL MSVCP_char_traits_lt(const char *ch1, const char *ch2)
76 /* ?compare@?$char_traits@D@std@@SAHPBD0I@Z */
77 /* ?compare@?$char_traits@D@std@@SAHPEBD0_K@Z */
78 int CDECL MSVCP_char_traits_char_compare(
79 const char *s1, const char *s2, MSVCP_size_t count)
81 int ret = memcmp(s1, s2, count);
82 return (ret>0 ? 1 : (ret<0 ? -1 : 0));
85 /* ?length@?$char_traits@D@std@@SAIPBD@Z */
86 /* ?length@?$char_traits@D@std@@SA_KPEBD@Z */
87 MSVCP_size_t CDECL MSVCP_char_traits_char_length(const char *str)
92 /* ?_Copy_s@?$char_traits@D@std@@SAPADPADIPBDI@Z */
93 /* ?_Copy_s@?$char_traits@D@std@@SAPEADPEAD_KPEBD1@Z */
94 char* CDECL MSVCP_char_traits_char__Copy_s(char *dest,
95 MSVCP_size_t size, const char *src, MSVCP_size_t count)
97 if(!dest || !src || size<count) {
100 _invalid_parameter(NULL, NULL, NULL, 0, 0);
104 return memcpy(dest, src, count);
107 /* ?copy@?$char_traits@D@std@@SAPADPADPBDI@Z */
108 /* ?copy@?$char_traits@D@std@@SAPEADPEADPEBD_K@Z */
109 char* CDECL MSVCP_char_traits_char_copy(
110 char *dest, const char *src, MSVCP_size_t count)
112 return MSVCP_char_traits_char__Copy_s(dest, count, src, count);
115 /* ?find@?$char_traits@D@std@@SAPBDPBDIABD@Z */
116 /* ?find@?$char_traits@D@std@@SAPEBDPEBD_KAEBD@Z */
117 const char * CDECL MSVCP_char_traits_char_find(
118 const char *str, MSVCP_size_t range, const char *c)
120 return memchr(str, *c, range);
123 /* ?_Move_s@?$char_traits@D@std@@SAPADPADIPBDI@Z */
124 /* ?_Move_s@?$char_traits@D@std@@SAPEADPEAD_KPEBD1@Z */
125 char* CDECL MSVCP_char_traits_char__Move_s(char *dest,
126 MSVCP_size_t size, const char *src, MSVCP_size_t count)
128 if(!dest || !src || size<count) {
131 _invalid_parameter(NULL, NULL, NULL, 0, 0);
135 return memmove(dest, src, count);
138 /* ?move@?$char_traits@D@std@@SAPADPADPBDI@Z */
139 /* ?move@?$char_traits@D@std@@SAPEADPEADPEBD_K@Z */
140 char* CDECL MSVCP_char_traits_char_move(
141 char *dest, const char *src, MSVCP_size_t count)
143 return MSVCP_char_traits_char__Move_s(dest, count, src, count);
146 /* ?assign@?$char_traits@D@std@@SAPADPADID@Z */
147 /* ?assign@?$char_traits@D@std@@SAPEADPEAD_KD@Z */
148 char* CDECL MSVCP_char_traits_char_assignn(char *str, MSVCP_size_t num, char c)
150 return memset(str, c, num);
153 /* ?to_char_type@?$char_traits@D@std@@SADABH@Z */
154 /* ?to_char_type@?$char_traits@D@std@@SADAEBH@Z */
155 char CDECL MSVCP_char_traits_char_to_char_type(const int *i)
160 /* ?to_int_type@?$char_traits@D@std@@SAHABD@Z */
161 /* ?to_int_type@?$char_traits@D@std@@SAHAEBD@Z */
162 int CDECL MSVCP_char_traits_char_to_int_type(const char *ch)
167 /* ?eq_int_type@?$char_traits@D@std@@SA_NABH0@Z */
168 /* ?eq_int_type@?$char_traits@D@std@@SA_NAEBH0@Z */
169 MSVCP_bool CDECL MSVCP_char_traits_char_eq_int_type(const int *i1, const int *i2)
174 /* ?eof@?$char_traits@D@std@@SAHXZ */
175 int CDECL MSVCP_char_traits_char_eof(void)
180 /* ?not_eof@?$char_traits@D@std@@SAHABH@Z */
181 /* ?not_eof@?$char_traits@D@std@@SAHAEBH@Z */
182 int CDECL MSVCP_char_traits_char_not_eof(int *in)
184 return (*in==EOF ? !EOF : *in);
188 /* char_traits<wchar_t> */
189 /* ?assign@?$char_traits@_W@std@@SAXAA_WAB_W@Z */
190 /* ?assign@?$char_traits@_W@std@@SAXAEA_WAEB_W@Z */
191 void CDECL MSVCP_char_traits_wchar_assign(wchar_t *ch,
192 const wchar_t *assign)
197 /* ?eq@?$char_traits@_W@std@@SA_NAB_W0@Z */
198 /* ?eq@?$char_traits@_W@std@@SA_NAEB_W0@Z */
199 MSVCP_bool CDECL MSVCP_char_traits_wchar_eq(wchar_t *ch1, wchar_t *ch2)
204 /* ?lt@?$char_traits@_W@std@@SA_NAB_W0@Z */
205 /* ?lt@?$char_traits@_W@std@@SA_NAEB_W0@Z */
206 MSVCP_bool CDECL MSVCP_char_traits_wchar_lt(const wchar_t *ch1,
212 /* ?compare@?$char_traits@_W@std@@SAHPB_W0I@Z */
213 /* ?compare@?$char_traits@_W@std@@SAHPEB_W0_K@Z */
214 int CDECL MSVCP_char_traits_wchar_compare(const wchar_t *s1,
215 const wchar_t *s2, MSVCP_size_t count)
217 int ret = memcmp(s1, s2, sizeof(wchar_t[count]));
218 return (ret>0 ? 1 : (ret<0 ? -1 : 0));
221 /* ?length@?$char_traits@_W@std@@SAIPB_W@Z */
222 /* ?length@?$char_traits@_W@std@@SA_KPEB_W@Z */
223 MSVCP_size_t CDECL MSVCP_char_traits_wchar_length(const wchar_t *str)
225 return wcslen((WCHAR*)str);
228 /* ?_Copy_s@?$char_traits@_W@std@@SAPA_WPA_WIPB_WI@Z */
229 /* ?_Copy_s@?$char_traits@_W@std@@SAPEA_WPEA_W_KPEB_W1@Z */
230 wchar_t* CDECL MSVCP_char_traits_wchar__Copy_s(wchar_t *dest,
231 MSVCP_size_t size, const wchar_t *src, MSVCP_size_t count)
233 if(!dest || !src || size<count) {
236 _invalid_parameter(NULL, NULL, NULL, 0, 0);
240 return memcpy(dest, src, sizeof(wchar_t[count]));
243 /* ?copy@?$char_traits@_W@std@@SAPA_WPA_WPB_WI@Z */
244 /* ?copy@?$char_traits@_W@std@@SAPEA_WPEA_WPEB_W_K@Z */
245 wchar_t* CDECL MSVCP_char_traits_wchar_copy(wchar_t *dest,
246 const wchar_t *src, MSVCP_size_t count)
248 return MSVCP_char_traits_wchar__Copy_s(dest, count, src, count);
251 /* ?find@?$char_traits@_W@std@@SAPB_WPB_WIAB_W@Z */
252 /* ?find@?$char_traits@_W@std@@SAPEB_WPEB_W_KAEB_W@Z */
253 const wchar_t* CDECL MSVCP_char_traits_wchar_find(
254 const wchar_t *str, MSVCP_size_t range, const wchar_t *c)
258 for(i=0; i<range; i++)
265 /* ?_Move_s@?$char_traits@_W@std@@SAPA_WPA_WIPB_WI@Z */
266 /* ?_Move_s@?$char_traits@_W@std@@SAPEA_WPEA_W_KPEB_W1@Z */
267 wchar_t* CDECL MSVCP_char_traits_wchar__Move_s(wchar_t *dest,
268 MSVCP_size_t size, const wchar_t *src, MSVCP_size_t count)
270 if(!dest || !src || size<count) {
273 _invalid_parameter(NULL, NULL, NULL, 0, 0);
277 return memmove(dest, src, sizeof(WCHAR[count]));
280 /* ?move@?$char_traits@_W@std@@SAPA_WPA_WPB_WI@Z */
281 /* ?move@?$char_traits@_W@std@@SAPEA_WPEA_WPEB_W_K@Z */
282 wchar_t* CDECL MSVCP_char_traits_wchar_move(wchar_t *dest,
283 const wchar_t *src, MSVCP_size_t count)
285 return MSVCP_char_traits_wchar__Move_s(dest, count, src, count);
288 /* ?assign@?$char_traits@_W@std@@SAPA_WPA_WI_W@Z */
289 /* ?assign@?$char_traits@_W@std@@SAPEA_WPEA_W_K_W@Z */
290 wchar_t* CDECL MSVCP_char_traits_wchar_assignn(wchar_t *str,
291 MSVCP_size_t num, wchar_t c)
301 /* ?to_char_type@?$char_traits@_W@std@@SA_WABG@Z */
302 /* ?to_char_type@?$char_traits@_W@std@@SA_WAEBG@Z */
303 wchar_t CDECL MSVCP_char_traits_wchar_to_char_type(const unsigned short *i)
308 /* ?to_int_type@?$char_traits@_W@std@@SAGAB_W@Z */
309 /* ?to_int_type@?$char_traits@_W@std@@SAGAEB_W@Z */
310 unsigned short CDECL MSVCP_char_traits_wchar_to_int_type(const wchar_t *ch)
315 /* ?eq_int_type@?$char_traits@_W@std@@SA_NABG0@Z */
316 /* ?eq_int_type@?$char_traits@_W@std@@SA_NAEBG0@Z */
317 MSVCP_bool CDECL MSVCP_char_traits_wchar_eq_int_tpe(const unsigned short *i1,
318 const unsigned short *i2)
323 /* ?eof@?$char_traits@_W@std@@SAGXZ */
324 unsigned short CDECL MSVCP_char_traits_wchar_eof(void)
329 /* ?not_eof@?$char_traits@_W@std@@SAGABG@Z */
330 /* ?not_eof@?$char_traits@_W@std@@SAGAEBG@Z */
331 unsigned short CDECL MSVCP_char_traits_wchar_not_eof(const unsigned short *in)
333 return (*in==WEOF ? !WEOF : *in);
337 /* char_traits<unsigned short> */
338 /* ?assign@?$char_traits@G@std@@SAXAAGABG@Z */
339 /* ?assign@?$char_traits@G@std@@SAXAEAGAEBG@Z */
340 void CDECL MSVCP_char_traits_short_assign(unsigned short *ch,
341 const unsigned short *assign)
346 /* ?eq@?$char_traits@G@std@@SA_NABG0@Z */
347 /* ?eq@?$char_traits@G@std@@SA_NAEBG0@Z */
348 MSVCP_bool CDECL MSVCP_char_traits_short_eq(const unsigned short *ch1,
349 const unsigned short *ch2)
354 /* ?lt@?$char_traits@G@std@@SA_NABG0@Z */
355 /* ?lt@?$char_traits@G@std@@SA_NAEBG0@Z */
356 MSVCP_bool CDECL MSVCP_char_traits_short_lt(const unsigned short *ch1,
357 const unsigned short *ch2)
362 /* ?compare@?$char_traits@G@std@@SAHPBG0I@Z */
363 /* ?compare@?$char_traits@G@std@@SAHPEBG0_K@Z */
364 int CDECL MSVCP_char_traits_short_compare(const unsigned short *s1,
365 const unsigned short *s2, MSVCP_size_t count)
369 for(i=0; i<count; i++)
371 return (s1[i] < s2[i] ? -1 : 1);
376 /* ?length@?$char_traits@G@std@@SAIPBG@Z */
377 /* ?length@?$char_traits@G@std@@SA_KPEBG@Z */
378 MSVCP_size_t CDECL MSVCP_char_traits_short_length(const unsigned short *str)
382 for(len=0; str[len]; len++);
387 /* ?_Copy_s@?$char_traits@G@std@@SAPAGPAGIPBGI@Z */
388 /* ?_Copy_s@?$char_traits@G@std@@SAPEAGPEAG_KPEBG1@Z */
389 unsigned short * CDECL MSVCP_char_traits_short__Copy_s(unsigned short *dest,
390 MSVCP_size_t size, const unsigned short *src, MSVCP_size_t count)
393 _invalid_parameter(NULL, NULL, NULL, 0, 0);
397 return memcpy(dest, src, sizeof(unsigned short[count]));
400 /* ?copy@?$char_traits@G@std@@SAPAGPAGPBGI@Z */
401 /* ?copy@?$char_traits@G@std@@SAPEAGPEAGPEBG_K@Z */
402 unsigned short* CDECL MSVCP_char_traits_short_copy(unsigned short *dest,
403 const unsigned short *src, MSVCP_size_t count)
405 return MSVCP_char_traits_short__Copy_s(dest, count, src, count);
408 /* ?find@?$char_traits@G@std@@SAPBGPBGIABG@Z */
409 /* ?find@?$char_traits@G@std@@SAPEBGPEBG_KAEBG@Z */
410 const unsigned short* CDECL MSVCP_char_traits_short_find(
411 const unsigned short *str, MSVCP_size_t range, const unsigned short *c)
415 for(i=0; i<range; i++)
422 /* ?_Move_s@?$char_traits@G@std@@SAPAGPAGIPBGI@Z */
423 /* ?_Move_s@?$char_traits@G@std@@SAPEAGPEAG_KPEBG1@Z */
424 unsigned short* CDECL MSVCP_char_traits_short__Move_s(unsigned short *dest,
425 MSVCP_size_t size, const unsigned short *src, MSVCP_size_t count)
428 _invalid_parameter(NULL, NULL, NULL, 0, 0);
432 return memmove(dest, src, sizeof(unsigned short[count]));
435 /* ?move@?$char_traits@G@std@@SAPAGPAGPBGI@Z */
436 /* ?move@?$char_traits@G@std@@SAPEAGPEAGPEBG_K@Z */
437 unsigned short* CDECL MSVCP_char_traits_short_move(unsigned short *dest,
438 const unsigned short *src, MSVCP_size_t count)
440 return MSVCP_char_traits_short__Move_s(dest, count, src, count);
443 /* ?assign@?$char_traits@G@std@@SAPAGPAGIG@Z */
444 /* ?assign@?$char_traits@G@std@@SAPEAGPEAG_KG@Z */
445 unsigned short* CDECL MSVCP_char_traits_short_assignn(unsigned short *str,
446 MSVCP_size_t num, unsigned short c)
456 /* ?to_char_type@?$char_traits@G@std@@SAGABG@Z */
457 /* ?to_char_type@?$char_traits@G@std@@SAGAEBG@Z */
458 unsigned short CDECL MSVCP_char_traits_short_to_char_type(const unsigned short *i)
463 /* ?to_int_type@?$char_traits@G@std@@SAGABG@Z */
464 /* ?to_int_type@?$char_traits@G@std@@SAGAEBG@Z */
465 unsigned short CDECL MSVCP_char_traits_short_to_int_type(const unsigned short *ch)
470 /* ?eq_int_type@?$char_traits@G@std@@SA_NABG0@Z */
471 /* ?eq_int_type@?$char_traits@G@std@@SA_NAEBG0@Z */
472 MSVCP_bool CDECL MSVCP_char_traits_short_eq_int_type(unsigned short *i1,
478 /* ?eof@?$char_traits@G@std@@SAGXZ */
479 unsigned short CDECL MSVCP_char_traits_short_eof(void)
484 /* ?not_eof@?$char_traits@G@std@@SAGABG@Z */
485 /* ?not_eof@?$char_traits@G@std@@SAGAEBG@Z */
486 unsigned short CDECL MSVCP_char_traits_short_not_eof(const unsigned short *in)
488 return (*in==(unsigned short)-1 ? 0 : *in);
493 /* ?_Xlen@_String_base@std@@SAXXZ */
494 void CDECL MSVCP__String_base_Xlen(void)
496 static const char msg[] = "string too long";
499 throw_exception(EXCEPTION_LENGTH_ERROR, msg);
502 /* ?_Xran@_String_base@std@@SAXXZ */
503 void CDECL MSVCP__String_base_Xran(void)
505 static const char msg[] = "invalid string position";
508 throw_exception(EXCEPTION_OUT_OF_RANGE, msg);
511 /* ?_Xinvarg@_String_base@std@@SAXXZ */
512 void CDECL MSVCP__String_base_Xinvarg(void)
514 static const char msg[] = "invalid string argument";
517 throw_exception(EXCEPTION_INVALID_ARGUMENT, msg);
521 /* basic_string<char, char_traits<char>, allocator<char>> */
522 /* ?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2IB */
523 /* ?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2_KB */
524 const MSVCP_size_t MSVCP_basic_string_char_npos = -1;
526 /* ?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEPADXZ */
527 /* ?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAPEADXZ */
528 DEFINE_THISCALL_WRAPPER(basic_string_char_ptr, 4)
529 char* __thiscall basic_string_char_ptr(basic_string_char *this)
531 if(this->res == BUF_SIZE_CHAR-1)
532 return this->data.buf;
533 return this->data.ptr;
536 /* ?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IBEPBDXZ */
537 /* ?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEBAPEBDXZ */
538 DEFINE_THISCALL_WRAPPER(basic_string_char_const_ptr, 4)
539 const char* __thiscall basic_string_char_const_ptr(const basic_string_char *this)
541 if(this->res == BUF_SIZE_CHAR-1)
542 return this->data.buf;
543 return this->data.ptr;
546 /* ?_Eos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXI@Z */
547 /* ?_Eos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAX_K@Z */
548 DEFINE_THISCALL_WRAPPER(basic_string_char_eos, 8)
549 void __thiscall basic_string_char_eos(basic_string_char *this, MSVCP_size_t len)
551 static const char nullbyte = '\0';
554 MSVCP_char_traits_char_assign(basic_string_char_ptr(this)+len, &nullbyte);
557 /* ?_Inside@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAE_NPBD@Z */
558 /* ?_Inside@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAA_NPEBD@Z */
559 DEFINE_THISCALL_WRAPPER(basic_string_char_inside, 8)
560 MSVCP_bool __thiscall basic_string_char_inside(
561 basic_string_char *this, const char *ptr)
563 char *cstr = basic_string_char_ptr(this);
565 return (ptr<cstr || ptr>=cstr+this->size) ? FALSE : TRUE;
568 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEX_NI@Z */
569 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAX_N_K@Z */
570 DEFINE_THISCALL_WRAPPER(basic_string_char_tidy, 12)
571 void __thiscall basic_string_char_tidy(basic_string_char *this,
572 MSVCP_bool built, MSVCP_size_t new_size)
574 if(built && BUF_SIZE_CHAR<=this->res) {
575 char *ptr = this->data.ptr;
578 MSVCP_char_traits_char__Copy_s(this->data.buf, BUF_SIZE_CHAR, ptr, new_size);
579 MSVCP_allocator_char_deallocate(this->allocator, ptr, this->res+1);
582 this->res = BUF_SIZE_CHAR-1;
583 basic_string_char_eos(this, new_size);
586 /* Exported only from msvcp60/70 */
587 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEX_N@Z */
588 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAX_N@Z */
589 DEFINE_THISCALL_WRAPPER(basic_string_char_tidy_built, 8)
590 void __thiscall basic_string_char_tidy_built(basic_string_char *this, MSVCP_bool built)
592 basic_string_char_tidy(this, built, 0);
595 /* ?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAE_NI_N@Z */
596 /* ?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAA_N_K_N@Z */
597 DEFINE_THISCALL_WRAPPER(basic_string_char_grow, 12)
598 MSVCP_bool __thiscall basic_string_char_grow(
599 basic_string_char *this, MSVCP_size_t new_size, MSVCP_bool trim)
601 if(this->res < new_size) {
602 MSVCP_size_t new_res = new_size, len = this->size;
607 if(new_res/3 < this->res/2)
608 new_res = this->res + this->res/2;
610 ptr = MSVCP_allocator_char_allocate(this->allocator, new_res+1);
612 ptr = MSVCP_allocator_char_allocate(this->allocator, new_size+1);
616 ERR("Out of memory\n");
617 basic_string_char_tidy(this, TRUE, 0);
621 MSVCP_char_traits_char__Copy_s(ptr, new_size,
622 basic_string_char_ptr(this), this->size);
623 basic_string_char_tidy(this, TRUE, 0);
624 this->data.ptr = ptr;
625 this->res = new_size;
626 basic_string_char_eos(this, len);
627 } else if(trim && new_size < BUF_SIZE_CHAR)
628 basic_string_char_tidy(this, TRUE,
629 new_size<this->size ? new_size : this->size);
630 else if(new_size == 0)
631 basic_string_char_eos(this, 0);
636 /* ?_Pdif@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KAIV?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0@Z */
637 /* ?_Pdif@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KA_KV?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0@Z */
638 MSVCP_size_t __cdecl MSVCP_basic_string_char_Pdif(String_iterator_char i1, String_iterator_char i2)
640 TRACE("(%p %p) (%p %p)\n", i1.bstr, i1.pos, i2.bstr, i2.pos);
642 if((!i1.bstr && i1.pos) || i1.bstr!=i2.bstr) {
643 _invalid_parameter(NULL, NULL, NULL, 0, 0);
647 return !i1.pos ? 0 : i1.pos-i2.pos;
650 /* ?get_allocator@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$allocator@D@2@XZ */
651 /* ?get_allocator@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$allocator@D@2@XZ */
652 DEFINE_THISCALL_WRAPPER_RETPTR(basic_string_char_get_allocator, 4)
653 allocator __thiscall basic_string_char_get_allocator(const basic_string_char *this)
660 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z */
661 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0@Z */
662 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_erase, 12)
663 basic_string_char* __thiscall MSVCP_basic_string_char_erase(
664 basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t len)
666 TRACE("%p %lu %lu\n", this, pos, len);
669 MSVCP__String_base_Xran();
671 if(len > this->size-pos)
672 len = this->size-pos;
675 MSVCP_char_traits_char__Move_s(basic_string_char_ptr(this)+pos,
676 this->res-pos, basic_string_char_ptr(this)+pos+len,
678 basic_string_char_eos(this, this->size-len);
684 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0@Z */
685 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0@Z */
686 DEFINE_THISCALL_WRAPPER_RETPTR(basic_string_char_erase_iter_range, 20)
687 String_iterator_char __thiscall basic_string_char_erase_iter_range(basic_string_char *this,
688 String_iterator_char beg, String_iterator_char end)
690 String_iterator_char iter = { this, basic_string_char_ptr(this) };
691 MSVCP_size_t off = MSVCP_basic_string_char_Pdif(beg, iter);
693 MSVCP_basic_string_char_erase(this, off, MSVCP_basic_string_char_Pdif(end, beg));
696 iter.pos = basic_string_char_ptr(this)+off;
700 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
701 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
702 DEFINE_THISCALL_WRAPPER_RETPTR(basic_string_char_erase_iter, 12)
703 String_iterator_char __thiscall basic_string_char_erase_iter(
704 basic_string_char *this, String_iterator_char pos)
706 String_iterator_char iter = { this, basic_string_char_ptr(this) };
707 MSVCP_size_t off = MSVCP_basic_string_char_Pdif(pos, iter);
709 MSVCP_basic_string_char_erase(this, off, 1);
712 iter.pos = basic_string_char_ptr(this)+off;
716 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */
717 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
718 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_substr, 16)
719 basic_string_char* __thiscall MSVCP_basic_string_char_assign_substr(
720 basic_string_char *this, const basic_string_char *assign,
721 MSVCP_size_t pos, MSVCP_size_t len)
723 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
725 if(assign->size < pos)
726 MSVCP__String_base_Xran();
728 if(len > assign->size-pos)
729 len = assign->size-pos;
732 MSVCP_basic_string_char_erase(this, pos+len, MSVCP_basic_string_char_npos);
733 MSVCP_basic_string_char_erase(this, 0, pos);
734 } else if(basic_string_char_grow(this, len, FALSE)) {
735 MSVCP_char_traits_char__Copy_s(basic_string_char_ptr(this),
736 this->res, basic_string_char_const_ptr(assign)+pos, len);
737 basic_string_char_eos(this, len);
743 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */
744 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */
745 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z */
746 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@AEBV01@@Z */
747 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign, 8)
748 basic_string_char* __thiscall MSVCP_basic_string_char_assign(
749 basic_string_char *this, const basic_string_char *assign)
751 return MSVCP_basic_string_char_assign_substr(this, assign,
752 0, MSVCP_basic_string_char_npos);
755 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z */
756 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z */
757 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_cstr_len, 12)
758 basic_string_char* __thiscall MSVCP_basic_string_char_assign_cstr_len(
759 basic_string_char *this, const char *str, MSVCP_size_t len)
761 TRACE("%p %s %lu\n", this, debugstr_a(str), len);
763 if(basic_string_char_inside(this, str))
764 return MSVCP_basic_string_char_assign_substr(this, this,
765 str-basic_string_char_ptr(this), len);
766 else if(basic_string_char_grow(this, len, FALSE)) {
767 MSVCP_char_traits_char__Copy_s(basic_string_char_ptr(this),
768 this->res, str, len);
769 basic_string_char_eos(this, len);
775 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@D@Z */
776 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@D@Z */
777 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_ch, 8)
778 basic_string_char* __thiscall MSVCP_basic_string_char_assign_ch(
779 basic_string_char *this, char ch)
781 return MSVCP_basic_string_char_assign_cstr_len(this, &ch, 1);
784 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z */
785 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD@Z */
786 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z */
787 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@PEBD@Z */
788 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_cstr, 8)
789 basic_string_char* __thiscall MSVCP_basic_string_char_assign_cstr(
790 basic_string_char *this, const char *str)
792 return MSVCP_basic_string_char_assign_cstr_len(this, str,
793 MSVCP_char_traits_char_length(str));
796 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */
797 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KD@Z */
798 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assignn, 12)
799 basic_string_char* __thiscall MSVCP_basic_string_char_assignn(
800 basic_string_char *this, MSVCP_size_t count, char ch)
802 TRACE("%p %ld %c\n", this, count, ch);
804 basic_string_char_grow(this, count, FALSE);
805 MSVCP_char_traits_char_assignn(basic_string_char_ptr(this), count, ch);
806 basic_string_char_eos(this, count);
810 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD0@Z */
811 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD0@Z */
812 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_ptr_ptr, 12)
813 basic_string_char* __thiscall MSVCP_basic_string_char_assign_ptr_ptr(
814 basic_string_char *this, const char *first, const char *last)
816 return MSVCP_basic_string_char_assign_cstr_len(this, first, last-first);
819 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0@Z */
820 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0@Z */
821 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_iter, 20)
822 basic_string_char* __thiscall MSVCP_basic_string_char_assign_iter(basic_string_char *this,
823 String_iterator_char beg, String_iterator_char end)
825 return MSVCP_basic_string_char_assign_ptr_ptr(this, beg.pos, end.pos+1);
828 /* ?_Chassign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXIID@Z */
829 /* ?_Chassign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAX_K0D@Z */
830 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_Chassign, 16)
831 void __thiscall MSVCP_basic_string_char_Chassign(basic_string_char *this,
832 MSVCP_size_t off, MSVCP_size_t count, char ch)
834 TRACE("%p %lu %lu %c\n", this, off, count, ch);
835 MSVCP_char_traits_char_assignn(basic_string_char_ptr(this)+off, count, ch);
838 /* ?_Copy_s@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPADIII@Z */
839 /* ?_Copy_s@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEAD_K11@Z */
840 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_Copy_s, 20)
841 MSVCP_size_t __thiscall MSVCP_basic_string_char_Copy_s(const basic_string_char *this,
842 char *dest, MSVCP_size_t size, MSVCP_size_t off, MSVCP_size_t count)
844 TRACE("%p %p %lu %lu %lu\n", this, dest, size, off, count);
847 MSVCP__String_base_Xran();
849 if(count > this->size-off)
850 count = this->size-off;
852 MSVCP_char_traits_char__Copy_s(dest, size,
853 basic_string_char_const_ptr(this)+off, count);
857 /* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
858 /* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
859 /* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
860 /* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
861 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_c_str, 4)
862 const char* __thiscall MSVCP_basic_string_char_c_str(basic_string_char *this)
865 return basic_string_char_const_ptr(this);
868 /* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
869 /* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
870 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_capacity, 4)
871 MSVCP_size_t __thiscall MSVCP_basic_string_char_capacity(basic_string_char *this)
877 /* ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z */
878 /* ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z */
879 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_reserve, 8)
880 void __thiscall MSVCP_basic_string_char_reserve(basic_string_char *this, MSVCP_size_t size)
884 TRACE("%p %ld\n", this, size);
890 basic_string_char_grow(this, size, FALSE);
891 basic_string_char_eos(this, len);
894 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ */
895 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@XZ */
896 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor, 4)
897 basic_string_char* __thiscall MSVCP_basic_string_char_ctor(basic_string_char *this)
901 basic_string_char_tidy(this, FALSE, 0);
905 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z */
906 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@@Z */
907 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_copy_ctor, 8)
908 basic_string_char* __thiscall MSVCP_basic_string_char_copy_ctor(
909 basic_string_char *this, const basic_string_char *copy)
911 TRACE("%p %p\n", this, copy);
913 basic_string_char_tidy(this, FALSE, 0);
914 MSVCP_basic_string_char_assign(this, copy);
918 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z */
919 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD@Z */
920 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_cstr, 8)
921 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr(
922 basic_string_char *this, const char *str)
924 TRACE("%p %s\n", this, debugstr_a(str));
926 basic_string_char_tidy(this, FALSE, 0);
927 MSVCP_basic_string_char_assign_cstr(this, str);
931 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDABV?$allocator@D@1@@Z */
932 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBDAEBV?$allocator@D@1@@Z */
933 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_cstr_alloc, 12)
934 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_alloc(
935 basic_string_char *this, const char *str, const void *alloc)
937 return MSVCP_basic_string_char_ctor_cstr(this, str);
940 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDI@Z */
941 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD_K@Z */
942 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_cstr_len, 12)
943 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_len(
944 basic_string_char *this, const char *str, MSVCP_size_t len)
946 TRACE("%p %s %ld\n", this, debugstr_a(str), len);
948 basic_string_char_tidy(this, FALSE, 0);
949 MSVCP_basic_string_char_assign_cstr_len(this, str, len);
953 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDIABV?$allocator@D@1@@Z */
954 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD_KAEBV?$allocator@D@1@@Z */
955 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_cstr_len_alloc, 16)
956 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_len_alloc(
957 basic_string_char *this, const char *str, MSVCP_size_t len, const void *alloc)
959 return MSVCP_basic_string_char_ctor_cstr_len(this, str, len);
962 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@II@Z */
963 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@_K1@Z */
964 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_substr, 16)
965 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_substr(
966 basic_string_char *this, const basic_string_char *assign,
967 MSVCP_size_t pos, MSVCP_size_t len)
969 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
971 basic_string_char_tidy(this, FALSE, 0);
972 MSVCP_basic_string_char_assign_substr(this, assign, pos, len);
976 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@IIABV?$allocator@D@1@@Z */
977 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@_K1AEBV?$allocator@D@1@@Z */
978 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_substr_alloc, 20)
979 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_substr_alloc(
980 basic_string_char *this, const basic_string_char *assign,
981 MSVCP_size_t pos, MSVCP_size_t len, const void *alloc)
983 return MSVCP_basic_string_char_ctor_substr(this, assign, pos, len);
986 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$allocator@D@1@@Z */
987 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV?$allocator@D@1@@Z */
988 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_alloc, 8)
989 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_alloc(
990 basic_string_char *this, const void *alloc)
992 TRACE("%p %p\n", this, alloc);
994 basic_string_char_tidy(this, FALSE, 0);
998 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ID@Z */
999 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@_KD@Z */
1000 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_ch, 12)
1001 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_ch(basic_string_char *this,
1002 MSVCP_size_t count, char ch)
1004 TRACE("%p %ld %c\n", this, count, ch);
1006 basic_string_char_tidy(this, FALSE, 0);
1007 MSVCP_basic_string_char_assignn(this, count, ch);
1011 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@IDABV?$allocator@D@1@@Z */
1012 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@_KDAEBV?$allocator@D@1@@Z */
1013 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_ch_alloc, 16)
1014 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_ch_alloc(basic_string_char *this,
1015 MSVCP_size_t count, char ch, const void *alloc)
1017 return MSVCP_basic_string_char_ctor_ch(this, count, ch);
1020 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD0@Z */
1021 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD0@Z */
1022 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_ptr_ptr, 12)
1023 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_ptr_ptr(basic_string_char *this,
1024 const char *first, const char *last)
1026 return MSVCP_basic_string_char_ctor_cstr_len(this, first, last-first);
1029 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@1@0@Z */
1030 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@1@0@Z */
1031 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_iter, 20)
1032 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_iter(basic_string_char *this,
1033 String_iterator_char beg, String_iterator_char end)
1035 return MSVCP_basic_string_char_ctor_cstr_len(this, beg.pos, end.pos-beg.pos+1);
1038 /* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ */
1039 /* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@XZ */
1040 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_dtor, 4)
1041 void __thiscall MSVCP_basic_string_char_dtor(basic_string_char *this)
1043 TRACE("%p\n", this);
1044 basic_string_char_tidy(this, TRUE, 0);
1047 /* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1048 /* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1049 /* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1050 /* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1051 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_length, 4)
1052 MSVCP_size_t __thiscall MSVCP_basic_string_char_length(basic_string_char *this)
1054 TRACE("%p\n", this);
1058 /* ?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1059 /* ?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1060 DEFINE_THISCALL_WRAPPER(basic_string_char_max_size, 4)
1061 MSVCP_size_t __thiscall basic_string_char_max_size(const basic_string_char *this)
1063 TRACE("%p\n", this);
1064 return MSVCP_allocator_char_max_size(this->allocator)-1;
1067 /* ?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE_NXZ */
1068 /* ?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_NXZ */
1069 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_empty, 4)
1070 MSVCP_bool __thiscall MSVCP_basic_string_char_empty(basic_string_char *this)
1072 TRACE("%p\n", this);
1073 return this->size == 0;
1076 /* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXAAV12@@Z */
1077 /* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEAV12@@Z */
1078 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_swap, 8)
1079 void __thiscall MSVCP_basic_string_char_swap(basic_string_char *this, basic_string_char *str)
1082 char tmp[sizeof(this->data)];
1083 const MSVCP_size_t size = this->size;
1084 const MSVCP_size_t res = this->res;
1086 memcpy(tmp, this->data.buf, sizeof(this->data));
1087 memcpy(this->data.buf, str->data.buf, sizeof(this->data));
1088 memcpy(str->data.buf, tmp, sizeof(this->data));
1090 this->size = str->size;
1091 this->res = str->res;
1098 /* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV12@II@Z */
1099 /* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV12@_K0@Z */
1100 DEFINE_THISCALL_WRAPPER_RETPTR(MSVCP_basic_string_char_substr, 12)
1101 basic_string_char __thiscall MSVCP_basic_string_char_substr(
1102 basic_string_char *this, MSVCP_size_t off, MSVCP_size_t len)
1104 basic_string_char ret = { 0 };
1105 TRACE("%p %lu %lu\n", this, off, len);
1107 MSVCP_basic_string_char_ctor_substr(&ret, this, off, len);
1111 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */
1112 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
1113 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_substr, 16)
1114 basic_string_char* __thiscall MSVCP_basic_string_char_append_substr(basic_string_char *this,
1115 const basic_string_char *append, MSVCP_size_t offset, MSVCP_size_t count)
1117 TRACE("%p %p %lu %lu\n", this, append, offset, count);
1119 if(append->size < offset)
1120 MSVCP__String_base_Xran();
1122 if(count > append->size-offset)
1123 count = append->size-offset;
1125 if(MSVCP_basic_string_char_npos-this->size<=count || this->size+count<this->size)
1126 MSVCP__String_base_Xlen();
1128 if(basic_string_char_grow(this, this->size+count, FALSE)) {
1129 MSVCP_char_traits_char__Copy_s(basic_string_char_ptr(this)+this->size,
1130 this->res-this->size, basic_string_char_const_ptr(append)+offset, count);
1131 basic_string_char_eos(this, this->size+count);
1137 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */
1138 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */
1139 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z */
1140 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@AEBV01@@Z */
1141 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append, 8)
1142 basic_string_char* __thiscall MSVCP_basic_string_char_append(
1143 basic_string_char *this, const basic_string_char *append)
1145 return MSVCP_basic_string_char_append_substr(this, append,
1146 0, MSVCP_basic_string_char_npos);
1149 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z */
1150 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z */
1151 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_cstr_len, 12)
1152 basic_string_char* __thiscall MSVCP_basic_string_char_append_cstr_len(
1153 basic_string_char *this, const char *append, MSVCP_size_t count)
1155 TRACE("%p %s %lu\n", this, debugstr_a(append), count);
1157 if(basic_string_char_inside(this, append))
1158 return MSVCP_basic_string_char_append_substr(this, this,
1159 append-basic_string_char_ptr(this), count);
1161 if(MSVCP_basic_string_char_npos-this->size<=count || this->size+count<this->size)
1162 MSVCP__String_base_Xlen();
1164 if(basic_string_char_grow(this, this->size+count, FALSE)) {
1165 MSVCP_char_traits_char__Copy_s(basic_string_char_ptr(this)+this->size,
1166 this->res-this->size, append, count);
1167 basic_string_char_eos(this, this->size+count);
1173 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z */
1174 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD@Z */
1175 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z */
1176 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@PEBD@Z */
1177 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_cstr, 8)
1178 basic_string_char* __thiscall MSVCP_basic_string_char_append_cstr(
1179 basic_string_char *this, const char *append)
1181 return MSVCP_basic_string_char_append_cstr_len(this, append,
1182 MSVCP_char_traits_char_length(append));
1185 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD0@Z */
1186 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD0@Z */
1187 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_beg_end, 12)
1188 basic_string_char* __thiscall MSVCP_basic_string_char_append_beg_end(
1189 basic_string_char *this, const char *beg, const char *end)
1191 return MSVCP_basic_string_char_append_cstr_len(this, beg, end-beg);
1194 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0@Z */
1195 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0@Z */
1196 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_iter, 20)
1197 basic_string_char* __thiscall MSVCP_basic_string_char_append_iter(
1198 basic_string_char *this, String_iterator_char beg, String_iterator_char end)
1200 return MSVCP_basic_string_char_append_cstr_len(this, beg.pos, end.pos-beg.pos+1);
1203 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */
1204 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KD@Z */
1205 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_len_ch, 12)
1206 basic_string_char* __thiscall MSVCP_basic_string_char_append_len_ch(
1207 basic_string_char *this, MSVCP_size_t count, char ch)
1209 TRACE("%p %lu %c\n", this, count, ch);
1211 if(MSVCP_basic_string_char_npos-this->size <= count)
1212 MSVCP__String_base_Xlen();
1214 if(basic_string_char_grow(this, this->size+count, FALSE)) {
1215 MSVCP_char_traits_char_assignn(basic_string_char_ptr(this)+this->size, count, ch);
1216 basic_string_char_eos(this, this->size+count);
1222 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@D@Z */
1223 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@D@Z */
1224 /* ?push_back@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXD@Z */
1225 /* ?push_back@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXD@Z */
1226 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_ch, 8)
1227 basic_string_char* __thiscall MSVCP_basic_string_char_append_ch(
1228 basic_string_char *this, char ch)
1230 return MSVCP_basic_string_char_append_len_ch(this, 1, ch);
1233 /* ??$?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 */
1234 /* ??$?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 */
1235 basic_string_char* __cdecl MSVCP_basic_string_char_concatenate_bstr_cstr(basic_string_char *ret,
1236 const basic_string_char *left, const char *right)
1238 TRACE("%p %s\n", left, debugstr_a(right));
1240 MSVCP_basic_string_char_copy_ctor(ret, left);
1241 MSVCP_basic_string_char_append_cstr(ret, right);
1245 /* ??$?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 */
1246 /* ??$?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 */
1247 basic_string_char* __cdecl MSVCP_basic_string_char_concatenate_cstr_bstr(basic_string_char *ret,
1248 const char *left, const basic_string_char *right)
1250 TRACE("%s %p\n", debugstr_a(left), right);
1252 MSVCP_basic_string_char_ctor_cstr(ret, left);
1253 MSVCP_basic_string_char_append(ret, right);
1257 /* ??$?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 */
1258 /* ??$?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 */
1259 basic_string_char* __cdecl MSVCP_basic_string_char_concatenate(basic_string_char *ret,
1260 const basic_string_char *left, const basic_string_char *right)
1262 TRACE("%p %p\n", left, right);
1264 MSVCP_basic_string_char_copy_ctor(ret, left);
1265 MSVCP_basic_string_char_append(ret, right);
1269 /* ??$?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 */
1270 /* ??$?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 */
1271 basic_string_char* __cdecl MSVCP_basic_string_char_concatenate_bstr_ch(basic_string_char *ret,
1272 const basic_string_char *left, char right)
1274 TRACE("%p %c\n", left, right);
1276 MSVCP_basic_string_char_copy_ctor(ret, left);
1277 MSVCP_basic_string_char_append_ch(ret, right);
1281 /* ??$?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 */
1282 /* ??$?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 */
1283 basic_string_char* __cdecl MSVCP_basic_string_char_concatenate_ch_bstr(basic_string_char *ret,
1284 char left, const basic_string_char *right)
1286 TRACE("%c %p\n", left, right);
1288 MSVCP_basic_string_char_ctor_cstr_len(ret, &left, 1);
1289 MSVCP_basic_string_char_append(ret, right);
1293 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIPBDI@Z */
1294 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0PEBD0@Z */
1295 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_substr_cstr_len, 20)
1296 int __thiscall MSVCP_basic_string_char_compare_substr_cstr_len(
1297 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
1298 const char *str, MSVCP_size_t count)
1302 TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_a(str), count);
1304 if(this->size < pos)
1305 MSVCP__String_base_Xran();
1307 if(pos+num > this->size)
1308 num = this->size-pos;
1310 ans = MSVCP_char_traits_char_compare(basic_string_char_const_ptr(this)+pos,
1311 str, num>count ? count : num);
1317 else if(num < count)
1322 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIPBD@Z */
1323 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0PEBD@Z */
1324 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_substr_cstr, 16)
1325 int __thiscall MSVCP_basic_string_char_compare_substr_cstr(const basic_string_char *this,
1326 MSVCP_size_t pos, MSVCP_size_t num, const char *str)
1328 return MSVCP_basic_string_char_compare_substr_cstr_len(this, pos, num,
1329 str, MSVCP_char_traits_char_length(str));
1332 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHPBD@Z */
1333 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAHPEBD@Z */
1334 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_cstr, 8)
1335 int __thiscall MSVCP_basic_string_char_compare_cstr(
1336 const basic_string_char *this, const char *str)
1338 return MSVCP_basic_string_char_compare_substr_cstr_len(this, 0, this->size,
1339 str, MSVCP_char_traits_char_length(str));
1342 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIABV12@II@Z */
1343 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0AEBV12@00@Z */
1344 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_substr_substr, 24)
1345 int __thiscall MSVCP_basic_string_char_compare_substr_substr(
1346 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
1347 const basic_string_char *compare, MSVCP_size_t off, MSVCP_size_t count)
1349 TRACE("%p %lu %lu %p %lu %lu\n", this, pos, num, compare, off, count);
1351 if(compare->size < off)
1352 MSVCP__String_base_Xran();
1354 if(off+count > compare->size)
1355 count = compare->size-off;
1357 return MSVCP_basic_string_char_compare_substr_cstr_len(this, pos, num,
1358 basic_string_char_const_ptr(compare)+off, count);
1361 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIABV12@@Z */
1362 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0AEBV12@@Z */
1363 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_substr, 16)
1364 int __thiscall MSVCP_basic_string_char_compare_substr(
1365 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
1366 const basic_string_char *compare)
1368 return MSVCP_basic_string_char_compare_substr_cstr_len(this, pos, num,
1369 basic_string_char_const_ptr(compare), compare->size);
1372 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHABV12@@Z */
1373 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAHAEBV12@@Z */
1374 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare, 8)
1375 int __thiscall MSVCP_basic_string_char_compare(
1376 const basic_string_char *this, const basic_string_char *compare)
1378 return MSVCP_basic_string_char_compare_substr_cstr_len(this, 0, this->size,
1379 basic_string_char_const_ptr(compare), compare->size);
1382 /* ??$?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 */
1383 /* ??$?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 */
1384 MSVCP_bool __cdecl MSVCP_basic_string_char_equal(
1385 const basic_string_char *left, const basic_string_char *right)
1387 return MSVCP_basic_string_char_compare(left, right) == 0;
1390 /* ??$?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 */
1391 /* ??$?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 */
1392 MSVCP_bool __cdecl MSVCP_basic_string_char_equal_str_cstr(
1393 const basic_string_char *left, const char *right)
1395 return MSVCP_basic_string_char_compare_cstr(left, right) == 0;
1398 /* ??$?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 */
1399 /* ??$?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 */
1400 MSVCP_bool __cdecl MSVCP_basic_string_char_equal_cstr_str(
1401 const char *left, const basic_string_char *right)
1403 return MSVCP_basic_string_char_compare_cstr(right, left) == 0;
1406 /* ??$?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 */
1407 /* ??$?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 */
1408 MSVCP_bool __cdecl MSVCP_basic_string_char_not_equal(
1409 const basic_string_char *left, const basic_string_char *right)
1411 return MSVCP_basic_string_char_compare(left, right) != 0;
1414 /* ??$?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 */
1415 /* ??$?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 */
1416 MSVCP_bool __cdecl MSVCP_basic_string_char_not_equal_str_cstr(
1417 const basic_string_char *left, const char *right)
1419 return MSVCP_basic_string_char_compare_cstr(left, right) != 0;
1422 /* ??$?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 */
1423 /* ??$?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 */
1424 MSVCP_bool __cdecl MSVCP_basic_string_char_not_equal_cstr_str(
1425 const char *left, const basic_string_char *right)
1427 return MSVCP_basic_string_char_compare_cstr(right, left) != 0;
1430 /* ??$?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 */
1431 /* ??$?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 */
1432 MSVCP_bool __cdecl MSVCP_basic_string_char_lower(
1433 const basic_string_char *left, const basic_string_char *right)
1435 return MSVCP_basic_string_char_compare(left, right) < 0;
1438 /* ??$?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 */
1439 /* ??$?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 */
1440 MSVCP_bool __cdecl MSVCP_basic_string_char_lower_bstr_cstr(
1441 const basic_string_char *left, const char *right)
1443 return MSVCP_basic_string_char_compare_cstr(left, right) < 0;
1446 /* ??$?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 */
1447 /* ??$?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 */
1448 MSVCP_bool __cdecl MSVCP_basic_string_char_lower_cstr_bstr(
1449 const char *left, const basic_string_char *right)
1451 return MSVCP_basic_string_char_compare_cstr(right, left) > 0;
1454 /* ??$?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 */
1455 /* ??$?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 */
1456 MSVCP_bool __cdecl MSVCP_basic_string_char_leq(
1457 const basic_string_char *left, const basic_string_char *right)
1459 return MSVCP_basic_string_char_compare(left, right) <= 0;
1462 /* ??$?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 */
1463 /* ??$?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 */
1464 MSVCP_bool __cdecl MSVCP_basic_string_char_leq_bstr_cstr(
1465 const basic_string_char *left, const char *right)
1467 return MSVCP_basic_string_char_compare_cstr(left, right) <= 0;
1470 /* ??$?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 */
1471 /* ??$?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 */
1472 MSVCP_bool __cdecl MSVCP_basic_string_char_leq_cstr_bstr(
1473 const char *left, const basic_string_char *right)
1475 return MSVCP_basic_string_char_compare_cstr(right, left) >= 0;
1478 /* ??$?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 */
1479 /* ??$?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 */
1480 MSVCP_bool __cdecl MSVCP_basic_string_char_greater(
1481 const basic_string_char *left, const basic_string_char *right)
1483 return MSVCP_basic_string_char_compare(left, right) > 0;
1486 /* ??$?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 */
1487 /* ??$?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 */
1488 MSVCP_bool __cdecl MSVCP_basic_string_char_greater_bstr_cstr(
1489 const basic_string_char *left, const char *right)
1491 return MSVCP_basic_string_char_compare_cstr(left, right) > 0;
1494 /* ??$?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 */
1495 /* ??$?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 */
1496 MSVCP_bool __cdecl MSVCP_basic_string_char_greater_cstr_bstr(
1497 const char *left, const basic_string_char *right)
1499 return MSVCP_basic_string_char_compare_cstr(right, left) < 0;
1502 /* ??$?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 */
1503 /* ??$?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 */
1504 MSVCP_bool __cdecl MSVCP_basic_string_char_geq(
1505 const basic_string_char *left, const basic_string_char *right)
1507 return MSVCP_basic_string_char_compare(left, right) >= 0;
1510 /* ??$?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 */
1511 /* ??$?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 */
1512 MSVCP_bool __cdecl MSVCP_basic_string_char_geq_bstr_cstr(
1513 const basic_string_char *left, const char *right)
1515 return MSVCP_basic_string_char_compare_cstr(left, right) >= 0;
1518 /* ??$?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 */
1519 /* ??$?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 */
1520 MSVCP_bool __cdecl MSVCP_basic_string_char_geq_cstr_bstr(
1521 const char *left, const basic_string_char *right)
1523 return MSVCP_basic_string_char_compare_cstr(right, left) <= 0;
1526 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1527 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1528 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_cstr_substr, 16)
1529 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_cstr_substr(
1530 const basic_string_char *this, const char *find, MSVCP_size_t pos, MSVCP_size_t len)
1532 const char *p, *end;
1534 TRACE("%p %s %lu %lu\n", this, debugstr_a(find), pos, len);
1536 if(len==0 && pos<=this->size)
1539 end = basic_string_char_const_ptr(this)+this->size-len+1;
1540 for(p=basic_string_char_const_ptr(this)+pos; p<end; p++) {
1541 p = MSVCP_char_traits_char_find(p, end-p, find);
1545 if(!MSVCP_char_traits_char_compare(p, find, len))
1546 return p-basic_string_char_const_ptr(this);
1549 return MSVCP_basic_string_char_npos;
1552 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1553 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1554 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_cstr_off, 12)
1555 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_cstr_off(
1556 const basic_string_char *this, const char *find, MSVCP_size_t pos)
1558 return MSVCP_basic_string_char_find_cstr_substr(this, find, pos,
1559 MSVCP_char_traits_char_length(find));
1562 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1563 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1564 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_off, 12)
1565 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_off(
1566 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1568 return MSVCP_basic_string_char_find_cstr_substr(this,
1569 basic_string_char_const_ptr(find), off, find->size);
1572 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1573 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1574 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_ch, 12)
1575 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_ch(
1576 const basic_string_char *this, char ch, MSVCP_size_t pos)
1578 return MSVCP_basic_string_char_find_cstr_substr(this, &ch, pos, 1);
1581 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1582 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1583 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_rfind_cstr_substr, 16)
1584 MSVCP_size_t __thiscall MSVCP_basic_string_char_rfind_cstr_substr(
1585 const basic_string_char *this, const char *find, MSVCP_size_t pos, MSVCP_size_t len)
1587 const char *p, *end;
1589 TRACE("%p %s %lu %lu\n", this, debugstr_a(find), pos, len);
1592 return pos<this->size ? pos : this->size;
1594 if(len > this->size)
1595 return MSVCP_basic_string_char_npos;
1597 if(pos > this->size-len+1)
1598 pos = this->size-len+1;
1599 end = basic_string_char_const_ptr(this);
1600 for(p=end+pos-1; p>=end; p--) {
1601 if(*p==*find && !MSVCP_char_traits_char_compare(p, find, len))
1602 return p-basic_string_char_const_ptr(this);
1605 return MSVCP_basic_string_char_npos;
1608 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1609 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1610 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_rfind_cstr_off, 12)
1611 MSVCP_size_t __thiscall MSVCP_basic_string_char_rfind_cstr_off(
1612 const basic_string_char *this, const char *find, MSVCP_size_t pos)
1614 return MSVCP_basic_string_char_rfind_cstr_substr(this, find, pos,
1615 MSVCP_char_traits_char_length(find));
1618 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1619 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1620 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_rfind_off, 12)
1621 MSVCP_size_t __thiscall MSVCP_basic_string_char_rfind_off(
1622 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1624 return MSVCP_basic_string_char_rfind_cstr_substr(this,
1625 basic_string_char_const_ptr(find), off, find->size);
1628 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1629 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1630 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_rfind_ch, 12)
1631 MSVCP_size_t __thiscall MSVCP_basic_string_char_rfind_ch(
1632 const basic_string_char *this, char ch, MSVCP_size_t pos)
1634 return MSVCP_basic_string_char_find_cstr_substr(this, &ch, pos, 1);
1637 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1638 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1639 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_of_cstr_substr, 16)
1640 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_of_cstr_substr(
1641 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
1643 const char *p, *end;
1645 TRACE("%p %p %lu %lu\n", this, find, off, len);
1647 if(len>0 && off<this->size) {
1648 end = basic_string_char_const_ptr(this)+this->size;
1649 for(p=basic_string_char_const_ptr(this)+off; p<end; p++)
1650 if(MSVCP_char_traits_char_find(find, len, p))
1651 return p-basic_string_char_const_ptr(this);
1654 return MSVCP_basic_string_char_npos;
1657 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1658 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1659 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_of, 12)
1660 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_of(
1661 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1663 return MSVCP_basic_string_char_find_first_of_cstr_substr(this,
1664 basic_string_char_const_ptr(find), off, find->size);
1667 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1668 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1669 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_of_cstr, 12)
1670 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_of_cstr(
1671 const basic_string_char *this, const char *find, MSVCP_size_t off)
1673 return MSVCP_basic_string_char_find_first_of_cstr_substr(
1674 this, find, off, MSVCP_char_traits_char_length(find));
1677 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1678 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1679 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_of_ch, 12)
1680 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_of_ch(
1681 const basic_string_char *this, char ch, MSVCP_size_t off)
1683 return MSVCP_basic_string_char_find_first_of_cstr_substr(this, &ch, off, 1);
1686 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1687 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1688 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_not_of_cstr_substr, 16)
1689 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_not_of_cstr_substr(
1690 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
1692 const char *p, *end;
1694 TRACE("%p %p %lu %lu\n", this, find, off, len);
1696 if(off<this->size) {
1697 end = basic_string_char_const_ptr(this)+this->size;
1698 for(p=basic_string_char_const_ptr(this)+off; p<end; p++)
1699 if(!MSVCP_char_traits_char_find(find, len, p))
1700 return p-basic_string_char_const_ptr(this);
1703 return MSVCP_basic_string_char_npos;
1706 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1707 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1708 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_not_of, 12)
1709 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_not_of(
1710 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1712 return MSVCP_basic_string_char_find_first_not_of_cstr_substr(this,
1713 basic_string_char_const_ptr(find), off, find->size);
1716 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1717 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1718 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_not_of_cstr, 12)
1719 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_not_of_cstr(
1720 const basic_string_char *this, const char *find, MSVCP_size_t off)
1722 return MSVCP_basic_string_char_find_first_not_of_cstr_substr(
1723 this, find, off, MSVCP_char_traits_char_length(find));
1726 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1727 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1728 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_not_of_ch, 12)
1729 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_not_of_ch(
1730 const basic_string_char *this, char ch, MSVCP_size_t off)
1732 return MSVCP_basic_string_char_find_first_not_of_cstr_substr(this, &ch, off, 1);
1735 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1736 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1737 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_of_cstr_substr, 16)
1738 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_of_cstr_substr(
1739 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
1741 const char *p, *beg;
1743 TRACE("%p %p %lu %lu\n", this, find, off, len);
1745 if(len>0 && this->size>0) {
1746 if(off >= this->size)
1749 beg = basic_string_char_const_ptr(this);
1750 for(p=beg+off; p>=beg; p--)
1751 if(MSVCP_char_traits_char_find(find, len, p))
1755 return MSVCP_basic_string_char_npos;
1758 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1759 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1760 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_of, 12)
1761 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_of(
1762 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1764 return MSVCP_basic_string_char_find_last_of_cstr_substr(this,
1765 basic_string_char_const_ptr(find), off, find->size);
1768 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1769 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1770 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_of_cstr, 12)
1771 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_of_cstr(
1772 const basic_string_char *this, const char *find, MSVCP_size_t off)
1774 return MSVCP_basic_string_char_find_last_of_cstr_substr(
1775 this, find, off, MSVCP_char_traits_char_length(find));
1778 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1779 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1780 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_of_ch, 12)
1781 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_of_ch(
1782 const basic_string_char *this, char ch, MSVCP_size_t off)
1784 return MSVCP_basic_string_char_find_last_of_cstr_substr(this, &ch, off, 1);
1787 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1788 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1789 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_not_of_cstr_substr, 16)
1790 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_not_of_cstr_substr(
1791 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
1793 const char *p, *beg;
1795 TRACE("%p %p %lu %lu\n", this, find, off, len);
1797 if(len>0 && this->size>0) {
1798 if(off >= this->size)
1801 beg = basic_string_char_const_ptr(this);
1802 for(p=beg+off; p>=beg; p--)
1803 if(!MSVCP_char_traits_char_find(find, len, p))
1807 return MSVCP_basic_string_char_npos;
1810 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1811 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1812 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_not_of, 12)
1813 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_not_of(
1814 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1816 return MSVCP_basic_string_char_find_last_not_of_cstr_substr(this,
1817 basic_string_char_const_ptr(find), off, find->size);
1820 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1821 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1822 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_not_of_cstr, 12)
1823 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_not_of_cstr(
1824 const basic_string_char *this, const char *find, MSVCP_size_t off)
1826 return MSVCP_basic_string_char_find_last_not_of_cstr_substr(
1827 this, find, off, MSVCP_char_traits_char_length(find));
1830 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1831 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1832 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_not_of_ch, 12)
1833 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_not_of_ch(
1834 const basic_string_char *this, char ch, MSVCP_size_t off)
1836 return MSVCP_basic_string_char_find_last_not_of_cstr_substr(this, &ch, off, 1);
1839 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */
1840 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */
1841 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_operator_at, 8)
1842 char* __thiscall MSVCP_basic_string_char_operator_at(
1843 basic_string_char *this, MSVCP_size_t pos)
1845 TRACE("%p %lu\n", this, pos);
1847 assert(this->size >= pos);
1848 return basic_string_char_ptr(this)+pos;
1851 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */
1852 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */
1853 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_const_operator_at, 8)
1854 const char* __thiscall MSVCP_basic_string_char_const_operator_at(
1855 const basic_string_char *this, MSVCP_size_t pos)
1857 TRACE("%p %lu\n", this, pos);
1859 assert(this->size >= pos);
1860 return basic_string_char_const_ptr(this)+pos;
1863 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADU_Size_type_nosscl@01@@Z */
1864 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEADU_Size_type_nosscl@01@@Z */
1865 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_operator_at_noverify, 8)
1866 char* __thiscall MSVCP_basic_string_char_operator_at_noverify(
1867 basic_string_char *this, size_t_noverify pos)
1869 TRACE("%p %lu\n", this, pos.val);
1870 return basic_string_char_ptr(this)+pos.val;
1873 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDU_Size_type_nosscl@01@@Z */
1874 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBDU_Size_type_nosscl@01@@Z */
1875 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_operator_const_at_noverify, 8)
1876 const char* __thiscall MSVCP_basic_string_char_operator_const_at_noverify(
1877 const basic_string_char *this, size_t_noverify pos)
1879 TRACE("%p %lu\n", this, pos.val);
1880 return basic_string_char_const_ptr(this)+pos.val;
1883 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */
1884 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */
1885 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_at, 8)
1886 char* __thiscall MSVCP_basic_string_char_at(
1887 basic_string_char *this, MSVCP_size_t pos)
1889 TRACE("%p %lu\n", this, pos);
1891 if(this->size <= pos)
1892 MSVCP__String_base_Xran();
1894 return basic_string_char_ptr(this)+pos;
1897 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */
1898 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */
1899 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_const_at, 8)
1900 const char* __thiscall MSVCP_basic_string_char_const_at(
1901 const basic_string_char *this, MSVCP_size_t pos)
1903 TRACE("%p %lu\n", this, pos);
1905 if(this->size <= pos)
1906 MSVCP__String_base_Xran();
1908 return basic_string_char_const_ptr(this)+pos;
1911 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBDI@Z */
1912 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD0@Z */
1913 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_cstr_len, 20)
1914 basic_string_char* __thiscall basic_string_char_replace_cstr_len(basic_string_char *this,
1915 MSVCP_size_t off, MSVCP_size_t len, const char *str, MSVCP_size_t str_len)
1917 MSVCP_size_t inside_pos = -1;
1918 char *ptr = basic_string_char_ptr(this);
1920 TRACE("%p %ld %ld %p %ld\n", this, off, len, str, str_len);
1922 if(this->size < off)
1923 MSVCP__String_base_Xran();
1925 if(off+len > this->size)
1926 len = this->size-off;
1928 if(MSVCP_basic_string_char_npos-str_len <= this->size-len)
1929 MSVCP__String_base_Xlen();
1931 if(basic_string_char_inside(this, str))
1932 inside_pos = str-ptr;
1935 basic_string_char_grow(this, this->size-len+str_len, FALSE);
1937 if(inside_pos == -1) {
1938 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1939 memcpy(ptr+off, str, str_len*sizeof(char));
1940 } else if(len >= str_len) {
1941 memmove(ptr+off, ptr+inside_pos, str_len*sizeof(char));
1942 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1946 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1948 if(inside_pos < off+len) {
1949 size = off+len-inside_pos;
1952 memmove(ptr+off, ptr+inside_pos, size*sizeof(char));
1958 memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(char));
1961 basic_string_char_eos(this, this->size-len+str_len);
1965 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBD@Z */
1966 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD@Z */
1967 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_cstr, 16)
1968 basic_string_char* __thiscall basic_string_char_replace_cstr(basic_string_char *this,
1969 MSVCP_size_t off, MSVCP_size_t len, const char *str)
1971 return basic_string_char_replace_cstr_len(this, off, len, str,
1972 MSVCP_char_traits_char_length(str));
1975 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@II@Z */
1976 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0AEBV12@00@Z */
1977 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_substr, 24)
1978 basic_string_char* __thiscall basic_string_char_replace_substr(basic_string_char *this, MSVCP_size_t off,
1979 MSVCP_size_t len, const basic_string_char *str, MSVCP_size_t str_off, MSVCP_size_t str_len)
1981 if(str->size < str_off)
1982 MSVCP__String_base_Xran();
1984 if(str_off+str_len > str->size)
1985 str_len = str->size-str_off;
1987 return basic_string_char_replace_cstr_len(this, off, len,
1988 basic_string_char_const_ptr(str)+str_off, str_len);
1991 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@@Z */
1992 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0AEBV12@@Z */
1993 DEFINE_THISCALL_WRAPPER(basic_string_char_replace, 16)
1994 basic_string_char* __thiscall basic_string_char_replace(basic_string_char *this,
1995 MSVCP_size_t off, MSVCP_size_t len, const basic_string_char *str)
1997 return basic_string_char_replace_cstr_len(this, off, len,
1998 basic_string_char_const_ptr(str), str->size);
2001 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIID@Z */
2002 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K00D@Z */
2003 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_ch, 20)
2004 basic_string_char* __thiscall basic_string_char_replace_ch(basic_string_char *this,
2005 MSVCP_size_t off, MSVCP_size_t len, MSVCP_size_t count, char ch)
2007 char *ptr = basic_string_char_ptr(this);
2009 TRACE("%p %ld %ld %ld %c\n", this, off, len, count, ch);
2011 if(this->size < off)
2012 MSVCP__String_base_Xran();
2014 if(off+len > this->size)
2015 len = this->size-off;
2017 if(MSVCP_basic_string_char_npos-count <= this->size-len)
2018 MSVCP__String_base_Xlen();
2021 basic_string_char_grow(this, this->size-len+count, FALSE);
2023 memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(char));
2024 MSVCP_char_traits_char_assignn(ptr+off, count, ch);
2025 basic_string_char_eos(this, this->size-len+count);
2030 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@000@Z */
2031 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@000@Z */
2032 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_iter, 36)
2033 basic_string_char* __thiscall basic_string_char_replace_iter_iter(basic_string_char *this,
2034 String_iterator_char beg, String_iterator_char end,
2035 String_iterator_char res_beg, String_iterator_char res_end)
2037 String_iterator_char begin = { this, basic_string_char_ptr(this) };
2038 return basic_string_char_replace_cstr_len(this,
2039 MSVCP_basic_string_char_Pdif(beg, begin), MSVCP_basic_string_char_Pdif(end, beg),
2040 res_beg.pos, MSVCP_basic_string_char_Pdif(res_end, res_beg));
2043 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0ABV12@@Z */
2044 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0AEBV12@@Z */
2045 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_bstr, 24)
2046 basic_string_char* __thiscall basic_string_char_replace_iter_bstr(basic_string_char *this,
2047 String_iterator_char beg, String_iterator_char end, const basic_string_char *str)
2049 String_iterator_char begin = { this, basic_string_char_ptr(this) };
2050 return basic_string_char_replace(this, MSVCP_basic_string_char_Pdif(beg, begin),
2051 MSVCP_basic_string_char_Pdif(end, begin), str);
2054 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0ID@Z */
2055 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0_KD@Z */
2056 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_ch, 28)
2057 basic_string_char* __thiscall basic_string_char_replace_iter_ch(basic_string_char *this,
2058 String_iterator_char beg, String_iterator_char end, MSVCP_size_t count, char ch)
2060 String_iterator_char begin = { this, basic_string_char_ptr(this) };
2061 return basic_string_char_replace_ch(this, MSVCP_basic_string_char_Pdif(beg, begin),
2062 MSVCP_basic_string_char_Pdif(end, begin), count, ch);
2065 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0PBD1@Z */
2066 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0PEBD1@Z */
2067 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_ptr_ptr, 28)
2068 basic_string_char* __thiscall basic_string_char_replace_iter_ptr_ptr(basic_string_char *this,
2069 String_iterator_char beg, String_iterator_char end,
2070 const char *res_beg, const char *res_end)
2072 String_iterator_char begin = { this, basic_string_char_ptr(this) };
2073 return basic_string_char_replace_cstr_len(this, MSVCP_basic_string_char_Pdif(beg, begin),
2074 MSVCP_basic_string_char_Pdif(end, begin), res_beg, res_end-res_beg);
2077 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0PBD@Z */
2078 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0PEBD@Z */
2079 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr, 24)
2080 basic_string_char* __thiscall basic_string_char_replace_iter_cstr(basic_string_char *this,
2081 String_iterator_char beg, String_iterator_char end, const char *str)
2083 String_iterator_char begin = { this, basic_string_char_ptr(this) };
2084 return basic_string_char_replace_cstr(this, MSVCP_basic_string_char_Pdif(beg, begin),
2085 MSVCP_basic_string_char_Pdif(end, begin), str);
2088 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0PBDI@Z */
2089 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0PEBD_K@Z */
2090 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr_len, 28)
2091 basic_string_char* __thiscall basic_string_char_replace_iter_cstr_len(basic_string_char *this,
2092 String_iterator_char beg, String_iterator_char end, const char *str, MSVCP_size_t len)
2094 String_iterator_char begin = { this, basic_string_char_ptr(this) };
2095 return basic_string_char_replace_cstr_len(this, MSVCP_basic_string_char_Pdif(beg, begin),
2096 MSVCP_basic_string_char_Pdif(end, begin), str, len);
2099 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXID@Z */
2100 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_KD@Z */
2101 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_resize_ch, 12)
2102 void __thiscall MSVCP_basic_string_char_resize_ch(
2103 basic_string_char *this, MSVCP_size_t size, char ch)
2105 TRACE("%p %lu %c\n", this, size, ch);
2107 if(size <= this->size)
2108 MSVCP_basic_string_char_erase(this, size, this->size);
2110 MSVCP_basic_string_char_append_len_ch(this, size-this->size, ch);
2113 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z */
2114 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z */
2115 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_resize, 8)
2116 void __thiscall MSVCP_basic_string_char_resize(
2117 basic_string_char *this, MSVCP_size_t size)
2119 MSVCP_basic_string_char_resize_ch(this, size, '\0');
2122 /* ?clear@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
2123 /* ?clear@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
2124 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_clear, 4)
2125 void __thiscall MSVCP_basic_string_char_clear(basic_string_char *this)
2127 basic_string_char_eos(this, 0);
2130 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2131 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2132 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2133 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2134 DEFINE_THISCALL_WRAPPER_RETPTR(MSVCP_basic_string_char_begin, 4)
2135 String_iterator_char __thiscall MSVCP_basic_string_char_begin(basic_string_char *this)
2137 String_iterator_char ret;
2139 TRACE("%p\n", this);
2142 ret.pos = basic_string_char_const_ptr(this);
2146 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2147 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2148 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2149 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2150 DEFINE_THISCALL_WRAPPER_RETPTR(MSVCP_basic_string_char_end, 4)
2151 String_iterator_char __thiscall MSVCP_basic_string_char_end(basic_string_char *this)
2153 String_iterator_char ret;
2155 TRACE("%p\n", this);
2158 ret.pos = basic_string_char_const_ptr(this)+this->size;
2162 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */
2163 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */
2164 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */
2165 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */
2166 DEFINE_THISCALL_WRAPPER_RETPTR(MSVCP_basic_string_char_rbegin, 4)
2167 String_reverse_iterator_char __thiscall MSVCP_basic_string_char_rbegin(basic_string_char *this)
2169 String_reverse_iterator_char ret;
2171 TRACE("%p\n", this);
2174 ret.pos = basic_string_char_const_ptr(this)+this->size;
2178 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */
2179 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */
2180 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */
2181 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@XZ */
2182 DEFINE_THISCALL_WRAPPER_RETPTR(MSVCP_basic_string_char_rend, 4)
2183 String_reverse_iterator_char __thiscall MSVCP_basic_string_char_rend(basic_string_char *this)
2185 String_reverse_iterator_char ret;
2187 TRACE("%p\n", this);
2190 ret.pos = basic_string_char_const_ptr(this);
2194 /* basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t>> */
2195 /* ?npos@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@2IB */
2196 /* ?npos@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@2_KB */
2197 const MSVCP_size_t MSVCP_basic_string_wchar_npos = -1;
2199 /* ?_Myptr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEPA_WXZ */
2200 /* ?_Myptr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAPEA_WXZ */
2201 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ptr, 4)
2202 wchar_t* __thiscall basic_string_wchar_ptr(basic_string_wchar *this)
2204 if(this->res == BUF_SIZE_WCHAR-1)
2205 return this->data.buf;
2206 return this->data.ptr;
2209 /* ?_Myptr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IBEPB_WXZ */
2210 /* ?_Myptr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEBAPEB_WXZ */
2211 DEFINE_THISCALL_WRAPPER(basic_string_wchar_const_ptr, 4)
2212 const wchar_t* __thiscall basic_string_wchar_const_ptr(const basic_string_wchar *this)
2214 if(this->res == BUF_SIZE_WCHAR-1)
2215 return this->data.buf;
2216 return this->data.ptr;
2219 /* ?_Eos@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXI@Z */
2220 /* ?_Eos@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAX_K@Z */
2221 DEFINE_THISCALL_WRAPPER(basic_string_wchar_eos, 8)
2222 void __thiscall basic_string_wchar_eos(basic_string_wchar *this, MSVCP_size_t len)
2224 static const wchar_t nullbyte_w = '\0';
2227 MSVCP_char_traits_wchar_assign(basic_string_wchar_ptr(this)+len, &nullbyte_w);
2230 /* ?_Inside@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAE_NPB_W@Z */
2231 /* ?_Inside@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAA_NPEB_W@Z */
2232 DEFINE_THISCALL_WRAPPER(basic_string_wchar_inside, 8)
2233 MSVCP_bool __thiscall basic_string_wchar_inside(
2234 basic_string_wchar *this, const wchar_t *ptr)
2236 wchar_t *cstr = basic_string_wchar_ptr(this);
2238 return (ptr<cstr || ptr>=cstr+this->size) ? FALSE : TRUE;
2241 /* ?_Tidy@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEX_NI@Z */
2242 /* ?_Tidy@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAX_N_K@Z */
2243 DEFINE_THISCALL_WRAPPER(basic_string_wchar_tidy, 12)
2244 void __thiscall basic_string_wchar_tidy(basic_string_wchar *this,
2245 MSVCP_bool built, MSVCP_size_t new_size)
2247 if(built && BUF_SIZE_WCHAR<=this->res) {
2248 wchar_t *ptr = this->data.ptr;
2251 MSVCP_char_traits_wchar__Copy_s(this->data.buf, BUF_SIZE_WCHAR, ptr, new_size);
2252 MSVCP_allocator_wchar_deallocate(this->allocator, ptr, this->res+1);
2255 this->res = BUF_SIZE_WCHAR-1;
2256 basic_string_wchar_eos(this, new_size);
2259 /* ?_Grow@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAE_NI_N@Z */
2260 /* ?_Grow@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAA_N_K_N@Z */
2261 DEFINE_THISCALL_WRAPPER(basic_string_wchar_grow, 12)
2262 MSVCP_bool __thiscall basic_string_wchar_grow(
2263 basic_string_wchar *this, MSVCP_size_t new_size, MSVCP_bool trim)
2265 if(this->res < new_size) {
2266 MSVCP_size_t new_res = new_size, len = this->size;
2271 if(new_res/3 < this->res/2)
2272 new_res = this->res + this->res/2;
2274 ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_res+1);
2276 ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_size+1);
2280 ERR("Out of memory\n");
2281 basic_string_wchar_tidy(this, TRUE, 0);
2285 MSVCP_char_traits_wchar__Copy_s(ptr, new_size,
2286 basic_string_wchar_ptr(this), this->size);
2287 basic_string_wchar_tidy(this, TRUE, 0);
2288 this->data.ptr = ptr;
2289 this->res = new_size;
2290 basic_string_wchar_eos(this, len);
2291 } else if(trim && new_size < BUF_SIZE_WCHAR)
2292 basic_string_wchar_tidy(this, TRUE,
2293 new_size<this->size ? new_size : this->size);
2294 else if(new_size == 0)
2295 basic_string_wchar_eos(this, 0);
2297 return (new_size>0);
2300 /* ?_Pdif@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@KAIV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0@Z */
2301 /* ?_Pdif@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@KA_KV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0@Z */
2302 MSVCP_size_t __cdecl MSVCP_basic_string_wchar_Pdif(String_iterator_wchar i1, String_iterator_wchar i2)
2304 TRACE("(%p %p) (%p %p)\n", i1.bstr, i1.pos, i2.bstr, i2.pos);
2306 if((!i1.bstr && i1.pos) || i1.bstr!=i2.bstr) {
2307 _invalid_parameter(NULL, NULL, NULL, 0, 0);
2311 return !i1.pos ? 0 : i1.pos-i2.pos;
2314 /* ?get_allocator@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$allocator@_W@2@XZ */
2315 /* ?get_allocator@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$allocator@_W@2@XZ */
2316 DEFINE_THISCALL_WRAPPER(basic_string_wchar_get_allocator, 4)
2317 allocator __thiscall basic_string_wchar_get_allocator(const basic_string_wchar *this)
2320 TRACE("%p\n", this);
2324 /* ?erase@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@II@Z */
2325 /* ?erase@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K0@Z */
2326 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_erase, 12)
2327 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_erase(
2328 basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t len)
2330 TRACE("%p %lu %lu\n", this, pos, len);
2332 if(pos > this->size)
2333 MSVCP__String_base_Xran();
2335 if(len > this->size-pos)
2336 len = this->size-pos;
2339 MSVCP_char_traits_wchar__Move_s(basic_string_wchar_ptr(this)+pos,
2340 this->res-pos, basic_string_wchar_ptr(this)+pos+len,
2341 this->size-pos-len);
2342 basic_string_wchar_eos(this, this->size-len);
2348 /* ?erase@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0@Z */
2349 /* ?erase@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0@Z */
2350 DEFINE_THISCALL_WRAPPER_RETPTR(basic_string_wchar_erase_iter_range, 20)
2351 String_iterator_wchar __thiscall basic_string_wchar_erase_iter_range(basic_string_wchar *this,
2352 String_iterator_wchar beg, String_iterator_wchar end)
2354 String_iterator_wchar iter = { this, basic_string_wchar_ptr(this) };
2355 MSVCP_size_t off = MSVCP_basic_string_wchar_Pdif(beg, iter);
2357 MSVCP_basic_string_wchar_erase(this, off, MSVCP_basic_string_wchar_Pdif(end, beg));
2360 iter.pos = basic_string_wchar_ptr(this)+off;
2364 /* ?erase@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */
2365 /* ?erase@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */
2366 DEFINE_THISCALL_WRAPPER_RETPTR(basic_string_wchar_erase_iter, 12)
2367 String_iterator_wchar __thiscall basic_string_wchar_erase_iter(
2368 basic_string_wchar *this, String_iterator_wchar pos)
2370 String_iterator_wchar iter = { this, basic_string_wchar_ptr(this) };
2371 MSVCP_size_t off = MSVCP_basic_string_wchar_Pdif(pos, iter);
2373 MSVCP_basic_string_wchar_erase(this, off, 1);
2376 iter.pos = basic_string_wchar_ptr(this)+off;
2380 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@ABV12@II@Z */
2381 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
2382 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_substr, 16)
2383 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_substr(
2384 basic_string_wchar *this, const basic_string_wchar *assign,
2385 MSVCP_size_t pos, MSVCP_size_t len)
2387 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
2389 if(assign->size < pos)
2390 MSVCP__String_base_Xran();
2392 if(len > assign->size-pos)
2393 len = assign->size-pos;
2395 if(this == assign) {
2396 MSVCP_basic_string_wchar_erase(this, pos+len, MSVCP_basic_string_wchar_npos);
2397 MSVCP_basic_string_wchar_erase(this, 0, pos);
2398 } else if(basic_string_wchar_grow(this, len, FALSE)) {
2399 MSVCP_char_traits_wchar__Copy_s(basic_string_wchar_ptr(this),
2400 this->res, basic_string_wchar_const_ptr(assign)+pos, len);
2401 basic_string_wchar_eos(this, len);
2407 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@ABV12@@Z */
2408 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@AEBV12@@Z */
2409 /* ??4?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV01@ABV01@@Z */
2410 /* ??4?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV01@AEBV01@@Z */
2411 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign, 8)
2412 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign(
2413 basic_string_wchar *this, const basic_string_wchar *assign)
2415 return MSVCP_basic_string_wchar_assign_substr(this, assign,
2416 0, MSVCP_basic_string_wchar_npos);
2419 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@PB_WI@Z */
2420 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@PEB_W_K@Z */
2421 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_cstr_len, 12)
2422 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_cstr_len(
2423 basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
2425 TRACE("%p %s %lu\n", this, debugstr_w(str), len);
2427 if(basic_string_wchar_inside(this, str))
2428 return MSVCP_basic_string_wchar_assign_substr(this, this,
2429 str-basic_string_wchar_ptr(this), len);
2430 else if(basic_string_wchar_grow(this, len, FALSE)) {
2431 MSVCP_char_traits_wchar__Copy_s(basic_string_wchar_ptr(this),
2432 this->res, str, len);
2433 basic_string_wchar_eos(this, len);
2439 /* ??4?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV01@_W@Z */
2440 /* ??4?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV01@_W@Z */
2441 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_ch, 8)
2442 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_ch(
2443 basic_string_wchar *this, wchar_t ch)
2445 return MSVCP_basic_string_wchar_assign_cstr_len(this, &ch, 1);
2448 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@PB_W@Z */
2449 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@PEB_W@Z */
2450 /* ??4?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV01@PB_W@Z */
2451 /* ??4?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV01@PEB_W@Z */
2452 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_cstr, 8)
2453 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_cstr(
2454 basic_string_wchar *this, const wchar_t *str)
2456 return MSVCP_basic_string_wchar_assign_cstr_len(this, str,
2457 MSVCP_char_traits_wchar_length(str));
2460 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@I_W@Z */
2461 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K_W@Z */
2462 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assignn, 12)
2463 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assignn(
2464 basic_string_wchar *this, MSVCP_size_t count, wchar_t ch)
2466 TRACE("%p %ld %c\n", this, count, ch);
2468 basic_string_wchar_grow(this, count, FALSE);
2469 MSVCP_char_traits_wchar_assignn(basic_string_wchar_ptr(this), count, ch);
2470 basic_string_wchar_eos(this, count);
2474 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@PB_W0@Z */
2475 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@PEB_W0@Z */
2476 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_ptr_ptr, 12)
2477 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_ptr_ptr(
2478 basic_string_wchar *this, const wchar_t *first, const wchar_t *last)
2480 return MSVCP_basic_string_wchar_assign_cstr_len(this, first, last-first);
2483 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0@Z */
2484 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0@Z */
2485 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_iter, 20)
2486 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_iter(basic_string_wchar *this,
2487 String_iterator_wchar beg, String_iterator_wchar end)
2489 return MSVCP_basic_string_wchar_assign_ptr_ptr(this, beg.pos, end.pos+1);
2492 /* ?_Chassign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXII_W@Z */
2493 /* ?_Chassign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAX_K0_W@Z */
2494 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_Chassign, 16)
2495 void __thiscall MSVCP_basic_string_wchar_Chassign(basic_string_wchar *this,
2496 MSVCP_size_t off, MSVCP_size_t count, wchar_t ch)
2498 TRACE("%p %lu %lu %c\n", this, off, count, ch);
2499 MSVCP_char_traits_wchar_assignn(basic_string_wchar_ptr(this)+off, count, ch);
2502 /* ?_Copy_s@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPA_WIII@Z */
2503 /* ?_Copy_s@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEA_W_K11@Z */
2504 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_Copy_s, 20)
2505 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_Copy_s(const basic_string_wchar *this,
2506 wchar_t *dest, MSVCP_size_t size, MSVCP_size_t off, MSVCP_size_t count)
2508 TRACE("%p %p %lu %lu %lu\n", this, dest, size, off, count);
2510 if(this->size < off)
2511 MSVCP__String_base_Xran();
2513 if(count > this->size-off)
2514 count = this->size-off;
2516 MSVCP_char_traits_wchar__Copy_s(dest, size,
2517 basic_string_wchar_const_ptr(this)+off, count);
2521 /* ?c_str@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEPB_WXZ */
2522 /* ?c_str@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAPEB_WXZ */
2523 /* ?data@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEPB_WXZ */
2524 /* ?data@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAPEB_WXZ */
2525 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_c_str, 4)
2526 const wchar_t* __thiscall MSVCP_basic_string_wchar_c_str(basic_string_wchar *this)
2528 TRACE("%p\n", this);
2529 return basic_string_wchar_const_ptr(this);
2532 /* ?capacity@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIXZ */
2533 /* ?capacity@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KXZ */
2534 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_capacity, 4)
2535 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_capacity(basic_string_wchar *this)
2537 TRACE("%p\n", this);
2541 /* ?reserve@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXI@Z */
2542 /* ?reserve@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAX_K@Z */
2543 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_reserve, 8)
2544 void __thiscall MSVCP_basic_string_wchar_reserve(basic_string_wchar *this, MSVCP_size_t size)
2548 TRACE("%p %ld\n", this, size);
2554 basic_string_wchar_grow(this, size, FALSE);
2555 basic_string_wchar_eos(this, len);
2558 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@XZ */
2559 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@XZ */
2560 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor, 4)
2561 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor(basic_string_wchar *this)
2563 TRACE("%p\n", this);
2565 basic_string_wchar_tidy(this, FALSE, 0);
2569 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV01@@Z */
2570 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV01@@Z */
2571 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_copy_ctor, 8)
2572 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_copy_ctor(
2573 basic_string_wchar *this, const basic_string_wchar *copy)
2575 TRACE("%p %p\n", this, copy);
2577 basic_string_wchar_tidy(this, FALSE, 0);
2578 MSVCP_basic_string_wchar_assign(this, copy);
2582 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@PB_W@Z */
2583 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@PEB_W@Z */
2584 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_cstr, 8)
2585 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr(
2586 basic_string_wchar *this, const wchar_t *str)
2588 TRACE("%p %s\n", this, debugstr_w(str));
2590 basic_string_wchar_tidy(this, FALSE, 0);
2591 MSVCP_basic_string_wchar_assign_cstr(this, str);
2595 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@PB_WABV?$allocator@_W@1@@Z */
2596 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@PEB_WAEBV?$allocator@_W@1@@Z */
2597 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_cstr_alloc, 12)
2598 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_alloc(
2599 basic_string_wchar *this, const wchar_t *str, const void *alloc)
2601 return MSVCP_basic_string_wchar_ctor_cstr(this, str);
2604 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@PB_WI@Z */
2605 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@PEB_W_K@Z */
2606 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_cstr_len, 12)
2607 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_len(
2608 basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
2610 TRACE("%p %s %ld\n", this, debugstr_w(str), len);
2612 basic_string_wchar_tidy(this, FALSE, 0);
2613 MSVCP_basic_string_wchar_assign_cstr_len(this, str, len);
2617 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@PB_WIABV?$allocator@_W@1@@Z */
2618 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@PEB_W_KAEBV?$allocator@_W@1@@Z */
2619 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_cstr_len_alloc, 16)
2620 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_len_alloc(
2621 basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len, const void *alloc)
2623 return MSVCP_basic_string_wchar_ctor_cstr_len(this, str, len);
2626 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV01@II@Z */
2627 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV01@_K1@Z */
2628 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_substr, 16)
2629 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_substr(
2630 basic_string_wchar *this, const basic_string_wchar *assign,
2631 MSVCP_size_t pos, MSVCP_size_t len)
2633 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
2635 basic_string_wchar_tidy(this, FALSE, 0);
2636 MSVCP_basic_string_wchar_assign_substr(this, assign, pos, len);
2640 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV01@IIABV?$allocator@_W@1@@Z */
2641 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV01@_K1AEBV?$allocator@_W@1@@Z */
2642 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_substr_alloc, 20)
2643 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_substr_alloc(
2644 basic_string_wchar *this, const basic_string_wchar *assign,
2645 MSVCP_size_t pos, MSVCP_size_t len, const void *alloc)
2647 return MSVCP_basic_string_wchar_ctor_substr(this, assign, pos, len);
2650 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV?$allocator@_W@1@@Z */
2651 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV?$allocator@_W@1@@Z */
2652 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_alloc, 8)
2653 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_alloc(
2654 basic_string_wchar *this, const void *alloc)
2656 TRACE("%p %p\n", this, alloc);
2658 basic_string_wchar_tidy(this, FALSE, 0);
2662 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@I_W@Z */
2663 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@_K_W@Z */
2664 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_ch, 12)
2665 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_ch(basic_string_wchar *this,
2666 MSVCP_size_t count, wchar_t ch)
2668 TRACE("%p %ld %c\n", this, count, ch);
2670 basic_string_wchar_tidy(this, FALSE, 0);
2671 MSVCP_basic_string_wchar_assignn(this, count, ch);
2675 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@I_WABV?$allocator@_W@1@@Z */
2676 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@_K_WAEBV?$allocator@_W@1@@Z */
2677 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_ch_alloc, 16)
2678 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_ch_alloc(basic_string_wchar *this,
2679 MSVCP_size_t count, wchar_t ch, const void *alloc)
2681 return MSVCP_basic_string_wchar_ctor_ch(this, count, ch);
2684 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@PB_W0@Z */
2685 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@PEB_W0@Z */
2686 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_ptr_ptr, 12)
2687 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_ptr_ptr(basic_string_wchar *this,
2688 const wchar_t *first, const wchar_t *last)
2690 return MSVCP_basic_string_wchar_ctor_cstr_len(this, first, last-first);
2693 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@0@Z */
2694 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@0@Z */
2695 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_iter, 20)
2696 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_iter(basic_string_wchar *this,
2697 String_iterator_wchar beg, String_iterator_wchar end)
2699 return MSVCP_basic_string_wchar_ctor_cstr_len(this, beg.pos, end.pos-beg.pos+1);
2702 /* ??1?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@XZ */
2703 /* ??1?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@XZ */
2704 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_dtor, 4)
2705 void __thiscall MSVCP_basic_string_wchar_dtor(basic_string_wchar *this)
2707 TRACE("%p\n", this);
2708 basic_string_wchar_tidy(this, TRUE, 0);
2711 /* ?size@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIXZ */
2712 /* ?size@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KXZ */
2713 /* ?length@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIXZ */
2714 /* ?length@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KXZ */
2715 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_length, 4)
2716 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_length(basic_string_wchar *this)
2718 TRACE("%p\n", this);
2722 /* ?max_size@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIXZ */
2723 /* ?max_size@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KXZ */
2724 DEFINE_THISCALL_WRAPPER(basic_string_wchar_max_size, 4)
2725 MSVCP_size_t __thiscall basic_string_wchar_max_size(const basic_string_wchar *this)
2727 TRACE("%p\n", this);
2728 return MSVCP_allocator_wchar_max_size(this->allocator)-1;
2731 /* ?empty@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE_NXZ */
2732 /* ?empty@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_NXZ */
2733 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_empty, 4)
2734 MSVCP_bool __thiscall MSVCP_basic_string_wchar_empty(basic_string_wchar *this)
2736 TRACE("%p\n", this);
2737 return this->size == 0;
2740 /* ?swap@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXAAV12@@Z */
2741 /* ?swap@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXAEAV12@@Z */
2742 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_swap, 8)
2743 void __thiscall MSVCP_basic_string_wchar_swap(basic_string_wchar *this, basic_string_wchar *str)
2746 char tmp[sizeof(this->data)];
2747 const MSVCP_size_t size = this->size;
2748 const MSVCP_size_t res = this->res;
2750 memcpy(tmp, this->data.buf, sizeof(this->data));
2751 memcpy(this->data.buf, str->data.buf, sizeof(this->data));
2752 memcpy(str->data.buf, tmp, sizeof(this->data));
2754 this->size = str->size;
2755 this->res = str->res;
2762 /* ?substr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV12@II@Z */
2763 /* ?substr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV12@_K0@Z */
2764 DEFINE_THISCALL_WRAPPER_RETPTR(MSVCP_basic_string_wchar_substr, 12)
2765 basic_string_wchar __thiscall MSVCP_basic_string_wchar_substr(
2766 basic_string_wchar *this, MSVCP_size_t off, MSVCP_size_t len)
2768 basic_string_wchar ret = { 0 };
2769 TRACE("%p %lu %lu\n", this, off, len);
2771 MSVCP_basic_string_wchar_ctor_substr(&ret, this, off, len);
2775 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@ABV12@II@Z */
2776 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
2777 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_substr, 16)
2778 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_substr(basic_string_wchar *this,
2779 const basic_string_wchar *append, MSVCP_size_t offset, MSVCP_size_t count)
2781 TRACE("%p %p %lu %lu\n", this, append, offset, count);
2783 if(append->size < offset)
2784 MSVCP__String_base_Xran();
2786 if(count > append->size-offset)
2787 count = append->size-offset;
2789 if(MSVCP_basic_string_wchar_npos-this->size<=count || this->size+count<this->size)
2790 MSVCP__String_base_Xlen();
2792 if(basic_string_wchar_grow(this, this->size+count, FALSE)) {
2793 MSVCP_char_traits_wchar__Copy_s(basic_string_wchar_ptr(this)+this->size,
2794 this->res-this->size, basic_string_wchar_const_ptr(append)+offset, count);
2795 basic_string_wchar_eos(this, this->size+count);
2801 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@ABV12@@Z */
2802 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@AEBV12@@Z */
2803 /* ??Y?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV01@ABV01@@Z */
2804 /* ??Y?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV01@AEBV01@@Z */
2805 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append, 8)
2806 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append(
2807 basic_string_wchar *this, const basic_string_wchar *append)
2809 return MSVCP_basic_string_wchar_append_substr(this, append,
2810 0, MSVCP_basic_string_wchar_npos);
2813 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@PB_WI@Z */
2814 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@PEB_W_K@Z */
2815 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_cstr_len, 12)
2816 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_cstr_len(
2817 basic_string_wchar *this, const wchar_t *append, MSVCP_size_t count)
2819 TRACE("%p %s %lu\n", this, debugstr_w(append), count);
2821 if(basic_string_wchar_inside(this, append))
2822 return MSVCP_basic_string_wchar_append_substr(this, this,
2823 append-basic_string_wchar_ptr(this), count);
2825 if(MSVCP_basic_string_wchar_npos-this->size<=count || this->size+count<this->size)
2826 MSVCP__String_base_Xlen();
2828 if(basic_string_wchar_grow(this, this->size+count, FALSE)) {
2829 MSVCP_char_traits_wchar__Copy_s(basic_string_wchar_ptr(this)+this->size,
2830 this->res-this->size, append, count);
2831 basic_string_wchar_eos(this, this->size+count);
2837 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@PB_W@Z */
2838 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@PEB_W@Z */
2839 /* ??Y?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV01@PB_W@Z */
2840 /* ??Y?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV01@PEB_W@Z */
2841 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_cstr, 8)
2842 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_cstr(
2843 basic_string_wchar *this, const wchar_t *append)
2845 return MSVCP_basic_string_wchar_append_cstr_len(this, append,
2846 MSVCP_char_traits_wchar_length(append));
2849 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@PB_W0@Z */
2850 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@PEB_W0@Z */
2851 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_beg_end, 12)
2852 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_beg_end(
2853 basic_string_wchar *this, const wchar_t *beg, const wchar_t *end)
2855 return MSVCP_basic_string_wchar_append_cstr_len(this, beg, end-beg);
2858 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0@Z */
2859 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0@Z */
2860 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_iter, 20)
2861 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_iter(
2862 basic_string_wchar *this, String_iterator_wchar beg, String_iterator_wchar end)
2864 return MSVCP_basic_string_wchar_append_cstr_len(this, beg.pos, end.pos-beg.pos+1);
2867 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@I_W@Z */
2868 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K_W@Z */
2869 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_len_ch, 12)
2870 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_len_ch(
2871 basic_string_wchar *this, MSVCP_size_t count, wchar_t ch)
2873 TRACE("%p %lu %c\n", this, count, ch);
2875 if(MSVCP_basic_string_wchar_npos-this->size <= count)
2876 MSVCP__String_base_Xlen();
2878 if(basic_string_wchar_grow(this, this->size+count, FALSE)) {
2879 MSVCP_char_traits_wchar_assignn(basic_string_wchar_ptr(this)+this->size, count, ch);
2880 basic_string_wchar_eos(this, this->size+count);
2886 /* ??Y?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV01@_W@Z */
2887 /* ??Y?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV01@_W@Z */
2888 /* ?push_back@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEX_W@Z */
2889 /* ?push_back@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAX_W@Z */
2890 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_ch, 8)
2891 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_ch(
2892 basic_string_wchar *this, wchar_t ch)
2894 return MSVCP_basic_string_wchar_append_len_ch(this, 1, ch);
2897 /* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@ABV10@PB_W@Z */
2898 /* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@AEBV10@PEB_W@Z */
2899 basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate_bstr_cstr(basic_string_wchar *ret,
2900 const basic_string_wchar *left, const wchar_t *right)
2902 TRACE("%p %s\n", left, debugstr_w(right));
2904 MSVCP_basic_string_wchar_copy_ctor(ret, left);
2905 MSVCP_basic_string_wchar_append_cstr(ret, right);
2909 /* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PB_WABV10@@Z */
2910 /* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PEB_WAEBV10@@Z */
2911 basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate_cstr_bstr(basic_string_wchar *ret,
2912 const wchar_t *left, const basic_string_wchar *right)
2914 TRACE("%s %p\n", debugstr_w(left), right);
2916 MSVCP_basic_string_wchar_ctor_cstr(ret, left);
2917 MSVCP_basic_string_wchar_append(ret, right);
2921 /* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@ABV10@0@Z */
2922 /* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@AEBV10@0@Z */
2923 basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate(basic_string_wchar *ret,
2924 const basic_string_wchar *left, const basic_string_wchar *right)
2926 TRACE("%p %p\n", left, right);
2928 MSVCP_basic_string_wchar_copy_ctor(ret, left);
2929 MSVCP_basic_string_wchar_append(ret, right);
2933 /* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@ABV10@_W@Z */
2934 /* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@AEBV10@_W@Z */
2935 basic_string_wchar __cdecl MSVCP_basic_string_wchar_concatenate_bstr_ch(
2936 const basic_string_wchar *left, wchar_t right)
2938 basic_string_wchar ret = { 0 };
2940 TRACE("%p %c\n", left, right);
2942 MSVCP_basic_string_wchar_copy_ctor(&ret, left);
2943 MSVCP_basic_string_wchar_append_ch(&ret, right);
2947 /* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@_WABV10@@Z */
2948 /* ??$?H_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@_WAEBV10@@Z */
2949 basic_string_wchar __cdecl MSVCP_basic_string_wchar_concatenate_ch_bstr(
2950 wchar_t left, const basic_string_wchar *right)
2952 basic_string_wchar ret = { 0 };
2954 TRACE("%c %p\n", left, right);
2956 MSVCP_basic_string_wchar_ctor_cstr_len(&ret, &left, 1);
2957 MSVCP_basic_string_wchar_append(&ret, right);
2961 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEHIIPB_WI@Z */
2962 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAH_K0PEB_W0@Z */
2963 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_substr_cstr_len, 20)
2964 int __thiscall MSVCP_basic_string_wchar_compare_substr_cstr_len(
2965 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2966 const wchar_t *str, MSVCP_size_t count)
2970 TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_w(str), count);
2972 if(this->size < pos)
2973 MSVCP__String_base_Xran();
2975 if(pos+num > this->size)
2976 num = this->size-pos;
2978 ans = MSVCP_char_traits_wchar_compare(basic_string_wchar_const_ptr(this)+pos,
2979 str, num>count ? count : num);
2985 else if(num < count)
2990 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEHIIPB_W@Z */
2991 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAH_K0PEB_W@Z */
2992 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_substr_cstr, 16)
2993 int __thiscall MSVCP_basic_string_wchar_compare_substr_cstr(const basic_string_wchar *this,
2994 MSVCP_size_t pos, MSVCP_size_t num, const wchar_t *str)
2996 return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2997 str, MSVCP_char_traits_wchar_length(str));
3000 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEHPB_W@Z */
3001 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAHPEB_W@Z */
3002 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_cstr, 8)
3003 int __thiscall MSVCP_basic_string_wchar_compare_cstr(
3004 const basic_string_wchar *this, const wchar_t *str)
3006 return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, 0, this->size,
3007 str, MSVCP_char_traits_wchar_length(str));
3010 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEHIIABV12@II@Z */
3011 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAH_K0AEBV12@00@Z */
3012 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_substr_substr, 24)
3013 int __thiscall MSVCP_basic_string_wchar_compare_substr_substr(
3014 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
3015 const basic_string_wchar *compare, MSVCP_size_t off, MSVCP_size_t count)
3017 TRACE("%p %lu %lu %p %lu %lu\n", this, pos, num, compare, off, count);
3019 if(compare->size < off)
3020 MSVCP__String_base_Xran();
3022 if(off+count > compare->size)
3023 count = compare->size-off;
3025 return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, pos, num,
3026 basic_string_wchar_const_ptr(compare)+off, count);
3029 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEHIIABV12@@Z */
3030 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAH_K0AEBV12@@Z */
3031 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_substr, 16)
3032 int __thiscall MSVCP_basic_string_wchar_compare_substr(
3033 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
3034 const basic_string_wchar *compare)
3036 return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, pos, num,
3037 basic_string_wchar_const_ptr(compare), compare->size);
3040 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEHABV12@@Z */
3041 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAHAEBV12@@Z */
3042 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare, 8)
3043 int __thiscall MSVCP_basic_string_wchar_compare(
3044 const basic_string_wchar *this, const basic_string_wchar *compare)
3046 return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, 0, this->size,
3047 basic_string_wchar_const_ptr(compare), compare->size);
3050 /* ??$?8_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */
3051 /* ??$?8_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */
3052 MSVCP_bool __cdecl MSVCP_basic_string_wchar_equal(
3053 const basic_string_wchar *left, const basic_string_wchar *right)
3055 return MSVCP_basic_string_wchar_compare(left, right) == 0;
3058 /* ??$?8_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PB_W@Z */
3059 /* ??$?8_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PEB_W@Z */
3060 MSVCP_bool __cdecl MSVCP_basic_string_wchar_equal_str_cstr(
3061 const basic_string_wchar *left, const wchar_t *right)
3063 return MSVCP_basic_string_wchar_compare_cstr(left, right) == 0;
3066 /* ??$?8_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPB_WABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
3067 /* ??$?8_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPEB_WAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
3068 MSVCP_bool __cdecl MSVCP_basic_string_wchar_equal_cstr_str(
3069 const wchar_t *left, const basic_string_wchar *right)
3071 return MSVCP_basic_string_wchar_compare_cstr(right, left) == 0;
3074 /* ??$?9_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */
3075 /* ??$?9_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */
3076 MSVCP_bool __cdecl MSVCP_basic_string_wchar_not_equal(
3077 const basic_string_wchar *left, const basic_string_wchar *right)
3079 return MSVCP_basic_string_wchar_compare(left, right) != 0;
3082 /* ??$?9_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PB_W@Z */
3083 /* ??$?9_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PEB_W@Z */
3084 MSVCP_bool __cdecl MSVCP_basic_string_wchar_not_equal_str_cstr(
3085 const basic_string_wchar *left, const wchar_t *right)
3087 return MSVCP_basic_string_wchar_compare_cstr(left, right) != 0;
3090 /* ??$?9_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPB_WABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
3091 /* ??$?9_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPEB_WAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
3092 MSVCP_bool __cdecl MSVCP_basic_string_wchar_not_equal_cstr_str(
3093 const wchar_t *left, const basic_string_wchar *right)
3095 return MSVCP_basic_string_wchar_compare_cstr(right, left) != 0;
3098 /* ??$?M_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */
3099 /* ??$?M_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */
3100 MSVCP_bool __cdecl MSVCP_basic_string_wchar_lower(
3101 const basic_string_wchar *left, const basic_string_wchar *right)
3103 return MSVCP_basic_string_wchar_compare(left, right) < 0;
3106 /* ??$?M_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PB_W@Z */
3107 /* ??$?M_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PEB_W@Z */
3108 MSVCP_bool __cdecl MSVCP_basic_string_wchar_lower_bstr_cstr(
3109 const basic_string_wchar *left, const wchar_t *right)
3111 return MSVCP_basic_string_wchar_compare_cstr(left, right) < 0;
3114 /* ??$?M_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPB_WABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
3115 /* ??$?M_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPEB_WAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
3116 MSVCP_bool __cdecl MSVCP_basic_string_wchar_lower_cstr_bstr(
3117 const wchar_t *left, const basic_string_wchar *right)
3119 return MSVCP_basic_string_wchar_compare_cstr(right, left) > 0;
3122 /* ??$?N_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */
3123 /* ??$?N_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */
3124 MSVCP_bool __cdecl MSVCP_basic_string_wchar_leq(
3125 const basic_string_wchar *left, const basic_string_wchar *right)
3127 return MSVCP_basic_string_wchar_compare(left, right) <= 0;
3130 /* ??$?N_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PB_W@Z */
3131 /* ??$?N_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PEB_W@Z */
3132 MSVCP_bool __cdecl MSVCP_basic_string_wchar_leq_bstr_cstr(
3133 const basic_string_wchar *left, const wchar_t *right)
3135 return MSVCP_basic_string_wchar_compare_cstr(left, right) <= 0;
3138 /* ??$?N_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPB_WABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
3139 /* ??$?N_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPEB_WAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
3140 MSVCP_bool __cdecl MSVCP_basic_string_wchar_leq_cstr_bstr(
3141 const wchar_t *left, const basic_string_wchar *right)
3143 return MSVCP_basic_string_wchar_compare_cstr(right, left) >= 0;
3146 /* ??$?O_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */
3147 /* ??$?O_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */
3148 MSVCP_bool __cdecl MSVCP_basic_string_wchar_greater(
3149 const basic_string_wchar *left, const basic_string_wchar *right)
3151 return MSVCP_basic_string_wchar_compare(left, right) > 0;
3154 /* ??$?O_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PB_W@Z */
3155 /* ??$?O_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PEB_W@Z */
3156 MSVCP_bool __cdecl MSVCP_basic_string_wchar_greater_bstr_cstr(
3157 const basic_string_wchar *left, const wchar_t *right)
3159 return MSVCP_basic_string_wchar_compare_cstr(left, right) > 0;
3162 /* ??$?O_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPB_WABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
3163 /* ??$?O_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPEB_WAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
3164 MSVCP_bool __cdecl MSVCP_basic_string_wchar_greater_cstr_bstr(
3165 const wchar_t *left, const basic_string_wchar *right)
3167 return MSVCP_basic_string_wchar_compare_cstr(right, left) < 0;
3170 /* ??$?P_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */
3171 /* ??$?P_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@0@Z */
3172 MSVCP_bool __cdecl MSVCP_basic_string_wchar_geq(
3173 const basic_string_wchar *left, const basic_string_wchar *right)
3175 return MSVCP_basic_string_wchar_compare(left, right) >= 0;
3178 /* ??$?P_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PB_W@Z */
3179 /* ??$?P_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@PEB_W@Z */
3180 MSVCP_bool __cdecl MSVCP_basic_string_wchar_geq_bstr_cstr(
3181 const basic_string_wchar *left, const wchar_t *right)
3183 return MSVCP_basic_string_wchar_compare_cstr(left, right) >= 0;
3186 /* ??$?P_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPB_WABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
3187 /* ??$?P_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YA_NPEB_WAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
3188 MSVCP_bool __cdecl MSVCP_basic_string_wchar_geq_cstr_bstr(
3189 const wchar_t *left, const basic_string_wchar *right)
3191 return MSVCP_basic_string_wchar_compare_cstr(right, left) <= 0;
3194 /* ?find@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WII@Z */
3195 /* ?find@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K1@Z */
3196 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_cstr_substr, 16)
3197 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_cstr_substr(
3198 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos, MSVCP_size_t len)
3200 const wchar_t *p, *end;
3202 TRACE("%p %s %lu %lu\n", this, debugstr_w(find), pos, len);
3204 if(len==0 && pos<=this->size)
3207 end = basic_string_wchar_const_ptr(this)+this->size-len+1;
3208 for(p=basic_string_wchar_const_ptr(this)+pos; p<end; p++) {
3209 p = MSVCP_char_traits_wchar_find(p, end-p, find);
3213 if(!MSVCP_char_traits_wchar_compare(p, find, len))
3214 return p-basic_string_wchar_const_ptr(this);
3217 return MSVCP_basic_string_wchar_npos;
3220 /* ?find@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WI@Z */
3221 /* ?find@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K@Z */
3222 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_cstr_off, 12)
3223 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_cstr_off(
3224 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos)
3226 return MSVCP_basic_string_wchar_find_cstr_substr(this, find, pos,
3227 MSVCP_char_traits_wchar_length(find));
3230 /* ?find@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIABV12@I@Z */
3231 /* ?find@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KAEBV12@_K@Z */
3232 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_off, 12)
3233 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_off(
3234 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
3236 return MSVCP_basic_string_wchar_find_cstr_substr(this,
3237 basic_string_wchar_const_ptr(find), off, find->size);
3240 /* ?find@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEI_WI@Z */
3241 /* ?find@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_K_W_K@Z */
3242 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_ch, 12)
3243 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_ch(
3244 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t pos)
3246 return MSVCP_basic_string_wchar_find_cstr_substr(this, &ch, pos, 1);
3249 /* ?rfind@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WII@Z */
3250 /* ?rfind@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K1@Z */
3251 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_rfind_cstr_substr, 16)
3252 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_rfind_cstr_substr(
3253 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos, MSVCP_size_t len)
3255 const wchar_t *p, *end;
3257 TRACE("%p %s %lu %lu\n", this, debugstr_w(find), pos, len);
3260 return pos<this->size ? pos : this->size;
3262 if(len > this->size)
3263 return MSVCP_basic_string_wchar_npos;
3265 if(pos > this->size-len+1)
3266 pos = this->size-len+1;
3267 end = basic_string_wchar_const_ptr(this);
3268 for(p=end+pos-1; p>=end; p--) {
3269 if(*p==*find && !MSVCP_char_traits_wchar_compare(p, find, len))
3270 return p-basic_string_wchar_const_ptr(this);
3273 return MSVCP_basic_string_wchar_npos;
3276 /* ?rfind@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WI@Z */
3277 /* ?rfind@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K@Z */
3278 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_rfind_cstr_off, 12)
3279 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_rfind_cstr_off(
3280 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos)
3282 return MSVCP_basic_string_wchar_rfind_cstr_substr(this, find, pos,
3283 MSVCP_char_traits_wchar_length(find));
3286 /* ?rfind@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIABV12@I@Z */
3287 /* ?rfind@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KAEBV12@_K@Z */
3288 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_rfind_off, 12)
3289 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_rfind_off(
3290 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
3292 return MSVCP_basic_string_wchar_rfind_cstr_substr(this,
3293 basic_string_wchar_const_ptr(find), off, find->size);
3296 /* ?rfind@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEI_WI@Z */
3297 /* ?rfind@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_K_W_K@Z */
3298 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_rfind_ch, 12)
3299 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_rfind_ch(
3300 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t pos)
3302 return MSVCP_basic_string_wchar_find_cstr_substr(this, &ch, pos, 1);
3305 /* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WII@Z */
3306 /* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K1@Z */
3307 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_of_cstr_substr, 16)
3308 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_of_cstr_substr(
3309 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
3311 const wchar_t *p, *end;
3313 TRACE("%p %p %lu %lu\n", this, find, off, len);
3315 if(len>0 && off<this->size) {
3316 end = basic_string_wchar_const_ptr(this)+this->size;
3317 for(p=basic_string_wchar_const_ptr(this)+off; p<end; p++)
3318 if(MSVCP_char_traits_wchar_find(find, len, p))
3319 return p-basic_string_wchar_const_ptr(this);
3322 return MSVCP_basic_string_wchar_npos;
3325 /* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIABV12@I@Z */
3326 /* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KAEBV12@_K@Z */
3327 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_of, 12)
3328 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_of(
3329 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
3331 return MSVCP_basic_string_wchar_find_first_of_cstr_substr(this,
3332 basic_string_wchar_const_ptr(find), off, find->size);
3335 /* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WI@Z */
3336 /* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K@Z */
3337 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_of_cstr, 12)
3338 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_of_cstr(
3339 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
3341 return MSVCP_basic_string_wchar_find_first_of_cstr_substr(
3342 this, find, off, MSVCP_char_traits_wchar_length(find));
3345 /* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEI_WI@Z */
3346 /* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_K_W_K@Z */
3347 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_of_ch, 12)
3348 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_of_ch(
3349 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
3351 return MSVCP_basic_string_wchar_find_first_of_cstr_substr(this, &ch, off, 1);
3354 /* ?find_first_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WII@Z */
3355 /* ?find_first_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K1@Z */
3356 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_not_of_cstr_substr, 16)
3357 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_not_of_cstr_substr(
3358 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
3360 const wchar_t *p, *end;
3362 TRACE("%p %p %lu %lu\n", this, find, off, len);
3364 if(off<this->size) {
3365 end = basic_string_wchar_const_ptr(this)+this->size;
3366 for(p=basic_string_wchar_const_ptr(this)+off; p<end; p++)
3367 if(!MSVCP_char_traits_wchar_find(find, len, p))
3368 return p-basic_string_wchar_const_ptr(this);
3371 return MSVCP_basic_string_wchar_npos;
3374 /* ?find_first_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIABV12@I@Z */
3375 /* ?find_first_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KAEBV12@_K@Z */
3376 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_not_of, 12)
3377 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_not_of(
3378 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
3380 return MSVCP_basic_string_wchar_find_first_not_of_cstr_substr(this,
3381 basic_string_wchar_const_ptr(find), off, find->size);
3384 /* ?find_first_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WI@Z */
3385 /* ?find_first_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K@Z */
3386 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_not_of_cstr, 12)
3387 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_not_of_cstr(
3388 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
3390 return MSVCP_basic_string_wchar_find_first_not_of_cstr_substr(
3391 this, find, off, MSVCP_char_traits_wchar_length(find));
3394 /* ?find_first_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEI_WI@Z */
3395 /* ?find_first_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_K_W_K@Z */
3396 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_not_of_ch, 12)
3397 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_not_of_ch(
3398 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
3400 return MSVCP_basic_string_wchar_find_first_not_of_cstr_substr(this, &ch, off, 1);
3403 /* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WII@Z */
3404 /* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K1@Z */
3405 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_of_cstr_substr, 16)
3406 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_of_cstr_substr(
3407 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
3409 const wchar_t *p, *beg;
3411 TRACE("%p %p %lu %lu\n", this, find, off, len);
3414 if(len>0 && this->size>0) {
3415 if(off >= this->size)
3418 beg = basic_string_wchar_const_ptr(this);
3419 for(p=beg+off; p>=beg; p--)
3420 if(MSVCP_char_traits_wchar_find(find, len, p))
3424 return MSVCP_basic_string_wchar_npos;
3427 /* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIABV12@I@Z */
3428 /* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KAEBV12@_K@Z */
3429 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_of, 12)
3430 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_of(
3431 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
3433 return MSVCP_basic_string_wchar_find_last_of_cstr_substr(this,
3434 basic_string_wchar_const_ptr(find), off, find->size);
3437 /* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WI@Z */
3438 /* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K@Z */
3439 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_of_cstr, 12)
3440 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_of_cstr(
3441 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
3443 return MSVCP_basic_string_wchar_find_last_of_cstr_substr(
3444 this, find, off, MSVCP_char_traits_wchar_length(find));
3447 /* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEI_WI@Z */
3448 /* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_K_W_K@Z */
3449 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_of_ch, 12)
3450 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_of_ch(
3451 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
3453 return MSVCP_basic_string_wchar_find_last_of_cstr_substr(this, &ch, off, 1);
3456 /* ?find_last_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WII@Z */
3457 /* ?find_last_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K1@Z */
3458 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_not_of_cstr_substr, 16)
3459 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_not_of_cstr_substr(
3460 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
3462 const wchar_t *p, *beg;
3464 TRACE("%p %p %lu %lu\n", this, find, off, len);
3466 if(len>0 && this->size>0) {
3467 if(off >= this->size)
3470 beg = basic_string_wchar_const_ptr(this);
3471 for(p=beg+off; p>=beg; p--)
3472 if(!MSVCP_char_traits_wchar_find(find, len, p))
3476 return MSVCP_basic_string_wchar_npos;
3479 /* ?find_last_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIABV12@I@Z */
3480 /* ?find_last_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KAEBV12@_K@Z */
3481 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_not_of, 12)
3482 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_not_of(
3483 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
3485 return MSVCP_basic_string_wchar_find_last_not_of_cstr_substr(this,
3486 basic_string_wchar_const_ptr(find), off, find->size);
3489 /* ?find_last_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WI@Z */
3490 /* ?find_last_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K@Z */
3491 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_not_of_cstr, 12)
3492 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_not_of_cstr(
3493 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
3495 return MSVCP_basic_string_wchar_find_last_not_of_cstr_substr(
3496 this, find, off, MSVCP_char_traits_wchar_length(find));
3499 /* ?find_last_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEI_WI@Z */
3500 /* ?find_last_not_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_K_W_K@Z */
3501 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_not_of_ch, 12)
3502 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_not_of_ch(
3503 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
3505 return MSVCP_basic_string_wchar_find_last_not_of_cstr_substr(this, &ch, off, 1);
3508 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@IIPB_WI@Z */
3509 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K0PEB_W0@Z */
3510 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_cstr_len, 20)
3511 basic_string_wchar* __thiscall basic_string_wchar_replace_cstr_len(basic_string_wchar *this,
3512 MSVCP_size_t off, MSVCP_size_t len, const wchar_t *str, MSVCP_size_t str_len)
3514 MSVCP_size_t inside_pos = -1;
3515 wchar_t *ptr = basic_string_wchar_ptr(this);
3517 TRACE("%p %ld %ld %p %ld\n", this, off, len, str, str_len);
3519 if(this->size < off)
3520 MSVCP__String_base_Xran();
3522 if(off+len > this->size)
3523 len = this->size-off;
3525 if(MSVCP_basic_string_wchar_npos-str_len <= this->size-len)
3526 MSVCP__String_base_Xlen();
3528 if(basic_string_wchar_inside(this, str))
3529 inside_pos = str-ptr;
3532 basic_string_wchar_grow(this, this->size-len+str_len, FALSE);
3534 if(inside_pos == -1) {
3535 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(wchar_t));
3536 memcpy(ptr+off, str, str_len*sizeof(wchar_t));
3537 } else if(len >= str_len) {
3538 memmove(ptr+off, ptr+inside_pos, str_len*sizeof(wchar_t));
3539 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(wchar_t));
3543 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(wchar_t));
3545 if(inside_pos < off+len) {
3546 size = off+len-inside_pos;
3549 memmove(ptr+off, ptr+inside_pos, size*sizeof(wchar_t));
3555 memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(wchar_t));
3558 basic_string_wchar_eos(this, this->size-len+str_len);
3562 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@IIPB_W@Z */
3563 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K0PEB_W@Z */
3564 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_cstr, 16)
3565 basic_string_wchar* __thiscall basic_string_wchar_replace_cstr(basic_string_wchar *this,
3566 MSVCP_size_t off, MSVCP_size_t len, const wchar_t *str)
3568 return basic_string_wchar_replace_cstr_len(this, off, len, str,
3569 MSVCP_char_traits_wchar_length(str));
3572 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@IIABV12@II@Z */
3573 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K0AEBV12@00@Z */
3574 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_substr, 24)
3575 basic_string_wchar* __thiscall basic_string_wchar_replace_substr(basic_string_wchar *this, MSVCP_size_t off,
3576 MSVCP_size_t len, const basic_string_wchar *str, MSVCP_size_t str_off, MSVCP_size_t str_len)
3578 if(str->size < str_off)
3579 MSVCP__String_base_Xran();
3581 if(str_off+str_len > str->size)
3582 str_len = str->size-str_off;
3584 return basic_string_wchar_replace_cstr_len(this, off, len,
3585 basic_string_wchar_const_ptr(str)+str_off, str_len);
3588 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@IIABV12@@Z */
3589 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K0AEBV12@@Z */
3590 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace, 16)
3591 basic_string_wchar* __thiscall basic_string_wchar_replace(basic_string_wchar *this,
3592 MSVCP_size_t off, MSVCP_size_t len, const basic_string_wchar *str)
3594 return basic_string_wchar_replace_cstr_len(this, off, len,
3595 basic_string_wchar_const_ptr(str), str->size);
3598 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@III_W@Z */
3599 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K00_W@Z */
3600 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_ch, 20)
3601 basic_string_wchar* __thiscall basic_string_wchar_replace_ch(basic_string_wchar *this,
3602 MSVCP_size_t off, MSVCP_size_t len, MSVCP_size_t count, wchar_t ch)
3604 wchar_t *ptr = basic_string_wchar_ptr(this);
3606 TRACE("%p %ld %ld %ld %c\n", this, off, len, count, ch);
3608 if(this->size < off)
3609 MSVCP__String_base_Xran();
3611 if(off+len > this->size)
3612 len = this->size-off;
3614 if(MSVCP_basic_string_wchar_npos-count <= this->size-len)
3615 MSVCP__String_base_Xlen();
3618 basic_string_wchar_grow(this, this->size-len+count, FALSE);
3620 memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(wchar_t));
3621 MSVCP_char_traits_wchar_assignn(ptr+off, count, ch);
3622 basic_string_wchar_eos(this, this->size-len+count);
3627 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@000@Z */
3628 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@000@Z */
3629 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_iter, 36)
3630 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_iter(basic_string_wchar *this,
3631 String_iterator_wchar beg, String_iterator_wchar end,
3632 String_iterator_wchar res_beg, String_iterator_wchar res_end)
3634 String_iterator_wchar begin = { this, basic_string_wchar_ptr(this) };
3635 return basic_string_wchar_replace_cstr_len(this,
3636 MSVCP_basic_string_wchar_Pdif(beg, begin), MSVCP_basic_string_wchar_Pdif(end, begin),
3637 res_beg.pos, MSVCP_basic_string_wchar_Pdif(res_end, res_beg));
3640 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0ABV12@@Z */
3641 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0AEBV12@@Z */
3642 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_bstr, 24)
3643 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_bstr(basic_string_wchar *this,
3644 String_iterator_wchar beg, String_iterator_wchar end, const basic_string_wchar *str)
3646 String_iterator_wchar begin = { this, basic_string_wchar_ptr(this) };
3647 return basic_string_wchar_replace(this, MSVCP_basic_string_wchar_Pdif(beg, begin),
3648 MSVCP_basic_string_wchar_Pdif(end, begin), str);
3651 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0I_W@Z */
3652 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0_K_W@Z */
3653 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_ch, 28)
3654 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_ch(basic_string_wchar *this,
3655 String_iterator_wchar beg, String_iterator_wchar end, MSVCP_size_t count, wchar_t ch)
3657 String_iterator_wchar begin = { this, basic_string_wchar_ptr(this) };
3658 return basic_string_wchar_replace_ch(this, MSVCP_basic_string_wchar_Pdif(beg, begin),
3659 MSVCP_basic_string_wchar_Pdif(end, begin), count, ch);
3662 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0PB_W1@Z */
3663 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0PEB_W1@Z */
3664 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_ptr_ptr, 28)
3665 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_ptr_ptr(basic_string_wchar *this,
3666 String_iterator_wchar beg, String_iterator_wchar end,
3667 const wchar_t *res_beg, const wchar_t *res_end)
3669 String_iterator_wchar begin = { this, basic_string_wchar_ptr(this) };
3670 return basic_string_wchar_replace_cstr_len(this, MSVCP_basic_string_wchar_Pdif(beg, begin),
3671 MSVCP_basic_string_wchar_Pdif(end, begin), res_beg, res_end-res_beg);
3674 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0PB_W@Z */
3675 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0PEB_W@Z */
3676 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr, 24)
3677 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr(basic_string_wchar *this,
3678 String_iterator_wchar beg, String_iterator_wchar end, const wchar_t *str)
3680 String_iterator_wchar begin = { this, basic_string_wchar_ptr(this) };
3681 return basic_string_wchar_replace_cstr(this, MSVCP_basic_string_wchar_Pdif(beg, begin),
3682 MSVCP_basic_string_wchar_Pdif(end, begin), str);
3685 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0PB_WI@Z */
3686 /* ?replace@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@0PEB_W_K@Z */
3687 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr_len, 28)
3688 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr_len(basic_string_wchar *this,
3689 String_iterator_wchar beg, String_iterator_wchar end, const wchar_t *str, MSVCP_size_t len)
3691 String_iterator_wchar begin = { this, basic_string_wchar_ptr(this) };
3692 return basic_string_wchar_replace_cstr_len(this, MSVCP_basic_string_wchar_Pdif(beg, begin),
3693 MSVCP_basic_string_wchar_Pdif(end, begin), str, len);
3696 /* ??A?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAA_WI@Z */
3697 /* ??A?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEA_W_K@Z */
3698 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_operator_at, 8)
3699 wchar_t* __thiscall MSVCP_basic_string_wchar_operator_at(
3700 basic_string_wchar *this, MSVCP_size_t pos)
3702 TRACE("%p %lu\n", this, pos);
3704 assert(this->size >= pos);
3705 return basic_string_wchar_ptr(this)+pos;
3708 /* ??A?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEAB_WI@Z */
3709 /* ??A?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAAEB_W_K@Z */
3710 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_const_operator_at, 8)
3711 const wchar_t* __thiscall MSVCP_basic_string_wchar_const_operator_at(
3712 const basic_string_wchar *this, MSVCP_size_t pos)
3714 TRACE("%p %lu\n", this, pos);
3716 assert(this->size >= pos);
3717 return basic_string_wchar_const_ptr(this)+pos;
3720 /* ??A?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAA_WU_Size_type_nosscl@01@@Z */
3721 /* ??A?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEA_WU_Size_type_nosscl@01@@Z */
3722 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_operator_at_noverify, 8)
3723 wchar_t* __thiscall MSVCP_basic_string_wchar_operator_at_noverify(
3724 basic_string_wchar *this, size_t_noverify pos)
3726 TRACE("%p %lu\n", this, pos.val);
3727 return basic_string_wchar_ptr(this)+pos.val;
3730 /* ??A?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEAB_WU_Size_type_nosscl@01@@Z */
3731 /* ??A?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAAEB_WU_Size_type_nosscl@01@@Z */
3732 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_operator_const_at_noverify, 8)
3733 const wchar_t* __thiscall MSVCP_basic_string_wchar_operator_const_at_noverify(
3734 const basic_string_wchar *this, size_t_noverify pos)
3736 TRACE("%p %lu\n", this, pos.val);
3737 return basic_string_wchar_const_ptr(this)+pos.val;
3740 /* ?at@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAA_WI@Z */
3741 /* ?at@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEA_W_K@Z */
3742 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_at, 8)
3743 wchar_t* __thiscall MSVCP_basic_string_wchar_at(
3744 basic_string_wchar *this, MSVCP_size_t pos)
3746 TRACE("%p %lu\n", this, pos);
3748 if(this->size <= pos)
3749 MSVCP__String_base_Xran();
3751 return basic_string_wchar_ptr(this)+pos;
3754 /* ?at@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEAB_WI@Z */
3755 /* ?at@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAAEB_W_K@Z */
3756 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_const_at, 8)
3757 const wchar_t* __thiscall MSVCP_basic_string_wchar_const_at(
3758 const basic_string_wchar *this, MSVCP_size_t pos)
3760 TRACE("%p %lu\n", this, pos);
3762 if(this->size <= pos)
3763 MSVCP__String_base_Xran();
3765 return basic_string_wchar_const_ptr(this)+pos;
3768 /* ?resize@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXI_W@Z */
3769 /* ?resize@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAX_K_W@Z */
3770 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_resize_ch, 12)
3771 void __thiscall MSVCP_basic_string_wchar_resize_ch(
3772 basic_string_wchar *this, MSVCP_size_t size, wchar_t ch)
3774 TRACE("%p %lu %c\n", this, size, ch);
3776 if(size <= this->size)
3777 MSVCP_basic_string_wchar_erase(this, size, this->size);
3779 MSVCP_basic_string_wchar_append_len_ch(this, size-this->size, ch);
3782 /* ?resize@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXI@Z */
3783 /* ?resize@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAX_K@Z */
3784 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_resize, 8)
3785 void __thiscall MSVCP_basic_string_wchar_resize(
3786 basic_string_wchar *this, MSVCP_size_t size)
3788 MSVCP_basic_string_wchar_resize_ch(this, size, '\0');
3791 /* ?clear@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
3792 /* ?clear@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
3793 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_clear, 4)
3794 void __thiscall MSVCP_basic_string_wchar_clear(basic_string_wchar *this)
3796 basic_string_wchar_eos(this, 0);
3799 /* ?begin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3800 /* ?begin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3801 /* ?begin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3802 /* ?begin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3803 DEFINE_THISCALL_WRAPPER_RETPTR(MSVCP_basic_string_wchar_begin, 4)
3804 String_iterator_wchar __thiscall MSVCP_basic_string_wchar_begin(basic_string_wchar *this)
3806 String_iterator_wchar ret;
3808 TRACE("%p\n", this);
3811 ret.pos = basic_string_wchar_const_ptr(this);
3815 /* ?end@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3816 /* ?end@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3817 /* ?end@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3818 /* ?end@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3819 DEFINE_THISCALL_WRAPPER_RETPTR(MSVCP_basic_string_wchar_end, 4)
3820 String_iterator_wchar __thiscall MSVCP_basic_string_wchar_end(basic_string_wchar *this)
3822 String_iterator_wchar ret;
3824 TRACE("%p\n", this);
3827 ret.pos = basic_string_wchar_const_ptr(this)+this->size;
3831 /* ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */
3832 /* ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */
3833 /* ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */
3834 /* ?rbegin@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */
3835 DEFINE_THISCALL_WRAPPER_RETPTR(MSVCP_basic_string_wchar_rbegin, 4)
3836 String_reverse_iterator_wchar __thiscall MSVCP_basic_string_wchar_rbegin(basic_string_wchar *this)
3838 String_reverse_iterator_wchar ret;
3840 TRACE("%p\n", this);
3843 ret.pos = basic_string_wchar_const_ptr(this)+this->size;
3847 /* ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */
3848 /* ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA?AV?$reverse_iterator@V?$_String_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */
3849 /* ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */
3850 /* ?rend@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$reverse_iterator@V?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@2@XZ */
3851 DEFINE_THISCALL_WRAPPER_RETPTR(MSVCP_basic_string_wchar_rend, 4)
3852 String_reverse_iterator_wchar __thiscall MSVCP_basic_string_wchar_rend(basic_string_wchar *this)
3854 String_reverse_iterator_wchar ret;
3856 TRACE("%p\n", this);
3859 ret.pos = basic_string_wchar_const_ptr(this);
3863 /* _String_val class */
3864 /* ??_F?$_String_val@DV?$allocator@D@std@@@std@@QAEXXZ */
3865 /* ??_F?$_String_val@DV?$allocator@D@std@@@std@@QEAAXXZ */
3866 /* ??_F?$_String_val@GV?$allocator@G@std@@@std@@QAEXXZ */
3867 /* ??_F?$_String_val@GV?$allocator@G@std@@@std@@QEAAXXZ */
3868 /* ??_F?$_String_val@_WV?$allocator@_W@std@@@std@@QAEXXZ */
3869 /* ??_F?$_String_val@_WV?$allocator@_W@std@@@std@@QEAAXXZ */
3870 DEFINE_THISCALL_WRAPPER(_String_val_ctor, 4)
3871 void* __thiscall _String_val_ctor(void *this)
3873 TRACE("%p\n", this);
3877 /* ??0?$_String_val@DV?$allocator@D@std@@@std@@IAE@V?$allocator@D@1@@Z */
3878 /* ??0?$_String_val@DV?$allocator@D@std@@@std@@IEAA@V?$allocator@D@1@@Z */
3879 /* ??0?$_String_val@GV?$allocator@G@std@@@std@@IAE@V?$allocator@G@1@@Z */
3880 /* ??0?$_String_val@GV?$allocator@G@std@@@std@@IEAA@V?$allocator@G@1@@Z */
3881 /* ??0?$_String_val@_WV?$allocator@_W@std@@@std@@IAE@V?$allocator@_W@1@@Z */
3882 /* ??0?$_String_val@_WV?$allocator@_W@std@@@std@@IEAA@V?$allocator@_W@1@@Z */
3883 /* ??0?$_String_val@DV?$allocator@D@std@@@std@@QAE@ABV01@@Z */
3884 /* ??0?$_String_val@DV?$allocator@D@std@@@std@@QEAA@AEBV01@@Z */
3885 /* ??0?$_String_val@GV?$allocator@G@std@@@std@@QAE@ABV01@@Z */
3886 /* ??0?$_String_val@GV?$allocator@G@std@@@std@@QEAA@AEBV01@@Z */
3887 /* ??0?$_String_val@_WV?$allocator@_W@std@@@std@@QAE@ABV01@@Z */
3888 /* ??0?$_String_val@_WV?$allocator@_W@std@@@std@@QEAA@AEBV01@@Z */
3889 /* ??4?$_String_val@DV?$allocator@D@std@@@std@@QAEAAV01@ABV01@@Z */
3890 /* ??4?$_String_val@DV?$allocator@D@std@@@std@@QEAAAEAV01@AEBV01@@Z */
3891 /* ??4?$_String_val@GV?$allocator@G@std@@@std@@QAEAAV01@ABV01@@Z */
3892 /* ??4?$_String_val@GV?$allocator@G@std@@@std@@QEAAAEAV01@AEBV01@@Z */
3893 /* ??4?$_String_val@_WV?$allocator@_W@std@@@std@@QAEAAV01@ABV01@@Z */
3894 /* ??4?$_String_val@_WV?$allocator@_W@std@@@std@@QEAAAEAV01@AEBV01@@Z */
3895 /* ??4?$_String_val@DV?$allocator@D@std@@@std@@QAEAAV01@ABV01@@Z */
3896 DEFINE_THISCALL_WRAPPER(_String_val_null_ctor, 8)
3897 void* __thiscall _String_val_null_ctor(void *this, const void *misc)
3899 TRACE("%p %p\n", this, misc);