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
28 #include "wine/debug.h"
29 WINE_DEFAULT_DEBUG_CHANNEL(msvcp90);
31 /* char_traits<char> */
32 /* ?assign@?$char_traits@D@std@@SAXAADABD@Z */
33 /* ?assign@?$char_traits@D@std@@SAXAEADAEBD@Z */
34 void CDECL MSVCP_char_traits_char_assign(char *ch, const char *assign)
39 /* ?eq@?$char_traits@D@std@@SA_NABD0@Z */
40 /* ?eq@?$char_traits@D@std@@SA_NAEBD0@Z */
41 MSVCP_bool CDECL MSVCP_char_traits_char_eq(const char *ch1, const char *ch2)
46 /* ?lt@?$char_traits@D@std@@SA_NABD0@Z */
47 /* ?lt@?$char_traits@D@std@@SA_NAEBD0@Z */
48 MSVCP_bool CDECL MSVCP_char_traits_lt(const char *ch1, const char *ch2)
53 /* ?compare@?$char_traits@D@std@@SAHPBD0I@Z */
54 /* ?compare@?$char_traits@D@std@@SAHPEBD0_K@Z */
55 int CDECL MSVCP_char_traits_char_compare(
56 const char *s1, const char *s2, MSVCP_size_t count)
58 int ret = memcmp(s1, s2, count);
59 return (ret>0 ? 1 : (ret<0 ? -1 : 0));
62 /* ?length@?$char_traits@D@std@@SAIPBD@Z */
63 /* ?length@?$char_traits@D@std@@SA_KPEBD@Z */
64 MSVCP_size_t CDECL MSVCP_char_traits_char_length(const char *str)
69 /* ?_Copy_s@?$char_traits@D@std@@SAPADPADIPBDI@Z */
70 /* ?_Copy_s@?$char_traits@D@std@@SAPEADPEAD_KPEBD1@Z */
71 char* CDECL MSVCP_char_traits_char__Copy_s(char *dest,
72 MSVCP_size_t size, const char *src, MSVCP_size_t count)
74 if(!dest || !src || size<count) {
77 _invalid_parameter(NULL, NULL, NULL, 0, 0);
81 return memcpy(dest, src, count);
84 /* ?copy@?$char_traits@D@std@@SAPADPADPBDI@Z */
85 /* ?copy@?$char_traits@D@std@@SAPEADPEADPEBD_K@Z */
86 char* CDECL MSVCP_char_traits_char_copy(
87 char *dest, const char *src, MSVCP_size_t count)
89 return MSVCP_char_traits_char__Copy_s(dest, count, src, count);
92 /* ?find@?$char_traits@D@std@@SAPBDPBDIABD@Z */
93 /* ?find@?$char_traits@D@std@@SAPEBDPEBD_KAEBD@Z */
94 const char * CDECL MSVCP_char_traits_char_find(
95 const char *str, MSVCP_size_t range, const char *c)
97 return memchr(str, *c, range);
100 /* ?_Move_s@?$char_traits@D@std@@SAPADPADIPBDI@Z */
101 /* ?_Move_s@?$char_traits@D@std@@SAPEADPEAD_KPEBD1@Z */
102 char* CDECL MSVCP_char_traits_char__Move_s(char *dest,
103 MSVCP_size_t size, const char *src, MSVCP_size_t count)
105 if(!dest || !src || size<count) {
108 _invalid_parameter(NULL, NULL, NULL, 0, 0);
112 return memmove(dest, src, count);
115 /* ?move@?$char_traits@D@std@@SAPADPADPBDI@Z */
116 /* ?move@?$char_traits@D@std@@SAPEADPEADPEBD_K@Z */
117 char* CDECL MSVCP_char_traits_char_move(
118 char *dest, const char *src, MSVCP_size_t count)
120 return MSVCP_char_traits_char__Move_s(dest, count, src, count);
123 /* ?assign@?$char_traits@D@std@@SAPADPADID@Z */
124 /* ?assign@?$char_traits@D@std@@SAPEADPEAD_KD@Z */
125 char* CDECL MSVCP_char_traits_char_assignn(char *str, MSVCP_size_t num, char c)
127 return memset(str, c, num);
130 /* ?to_char_type@?$char_traits@D@std@@SADABH@Z */
131 /* ?to_char_type@?$char_traits@D@std@@SADAEBH@Z */
132 char CDECL MSVCP_char_traits_char_to_char_type(const int *i)
137 /* ?to_int_type@?$char_traits@D@std@@SAHABD@Z */
138 /* ?to_int_type@?$char_traits@D@std@@SAHAEBD@Z */
139 int CDECL MSVCP_char_traits_char_to_int_type(const char *ch)
144 /* ?eq_int_type@?$char_traits@D@std@@SA_NABH0@Z */
145 /* ?eq_int_type@?$char_traits@D@std@@SA_NAEBH0@Z */
146 MSVCP_bool CDECL MSVCP_char_traits_char_eq_int_type(const int *i1, const int *i2)
151 /* ?eof@?$char_traits@D@std@@SAHXZ */
152 int CDECL MSVCP_char_traits_char_eof(void)
157 /* ?not_eof@?$char_traits@D@std@@SAHABH@Z */
158 /* ?not_eof@?$char_traits@D@std@@SAHAEBH@Z */
159 int CDECL MSVCP_char_traits_char_not_eof(int *in)
161 return (*in==EOF ? !EOF : *in);
165 /* char_traits<wchar_t> */
166 /* ?assign@?$char_traits@_W@std@@SAXAA_WAB_W@Z */
167 /* ?assign@?$char_traits@_W@std@@SAXAEA_WAEB_W@Z */
168 void CDECL MSVCP_char_traits_wchar_assign(wchar_t *ch,
169 const wchar_t *assign)
174 /* ?eq@?$char_traits@_W@std@@SA_NAB_W0@Z */
175 /* ?eq@?$char_traits@_W@std@@SA_NAEB_W0@Z */
176 MSVCP_bool CDECL MSVCP_char_traits_wchar_eq(wchar_t *ch1, wchar_t *ch2)
181 /* ?lt@?$char_traits@_W@std@@SA_NAB_W0@Z */
182 /* ?lt@?$char_traits@_W@std@@SA_NAEB_W0@Z */
183 MSVCP_bool CDECL MSVCP_char_traits_wchar_lt(const wchar_t *ch1,
189 /* ?compare@?$char_traits@_W@std@@SAHPB_W0I@Z */
190 /* ?compare@?$char_traits@_W@std@@SAHPEB_W0_K@Z */
191 int CDECL MSVCP_char_traits_wchar_compare(const wchar_t *s1,
192 const wchar_t *s2, MSVCP_size_t count)
194 int ret = memcmp(s1, s2, sizeof(wchar_t[count]));
195 return (ret>0 ? 1 : (ret<0 ? -1 : 0));
198 /* ?length@?$char_traits@_W@std@@SAIPB_W@Z */
199 /* ?length@?$char_traits@_W@std@@SA_KPEB_W@Z */
200 MSVCP_size_t CDECL MSVCP_char_traits_wchar_length(const wchar_t *str)
202 return wcslen((WCHAR*)str);
205 /* ?_Copy_s@?$char_traits@_W@std@@SAPA_WPA_WIPB_WI@Z */
206 /* ?_Copy_s@?$char_traits@_W@std@@SAPEA_WPEA_W_KPEB_W1@Z */
207 wchar_t* CDECL MSVCP_char_traits_wchar__Copy_s(wchar_t *dest,
208 MSVCP_size_t size, const wchar_t *src, MSVCP_size_t count)
210 if(!dest || !src || size<count) {
213 _invalid_parameter(NULL, NULL, NULL, 0, 0);
217 return memcpy(dest, src, sizeof(wchar_t[count]));
220 /* ?copy@?$char_traits@_W@std@@SAPA_WPA_WPB_WI@Z */
221 /* ?copy@?$char_traits@_W@std@@SAPEA_WPEA_WPEB_W_K@Z */
222 wchar_t* CDECL MSVCP_char_traits_wchar_copy(wchar_t *dest,
223 const wchar_t *src, MSVCP_size_t count)
225 return MSVCP_char_traits_wchar__Copy_s(dest, count, src, count);
228 /* ?find@?$char_traits@_W@std@@SAPB_WPB_WIAB_W@Z */
229 /* ?find@?$char_traits@_W@std@@SAPEB_WPEB_W_KAEB_W@Z */
230 const wchar_t* CDECL MSVCP_char_traits_wchar_find(
231 const wchar_t *str, MSVCP_size_t range, const wchar_t *c)
235 for(i=0; i<range; i++)
242 /* ?_Move_s@?$char_traits@_W@std@@SAPA_WPA_WIPB_WI@Z */
243 /* ?_Move_s@?$char_traits@_W@std@@SAPEA_WPEA_W_KPEB_W1@Z */
244 wchar_t* CDECL MSVCP_char_traits_wchar__Move_s(wchar_t *dest,
245 MSVCP_size_t size, const wchar_t *src, MSVCP_size_t count)
247 if(!dest || !src || size<count) {
250 _invalid_parameter(NULL, NULL, NULL, 0, 0);
254 return memmove(dest, src, sizeof(WCHAR[count]));
257 /* ?move@?$char_traits@_W@std@@SAPA_WPA_WPB_WI@Z */
258 /* ?move@?$char_traits@_W@std@@SAPEA_WPEA_WPEB_W_K@Z */
259 wchar_t* CDECL MSVCP_char_traits_wchar_move(wchar_t *dest,
260 const wchar_t *src, MSVCP_size_t count)
262 return MSVCP_char_traits_wchar__Move_s(dest, count, src, count);
265 /* ?assign@?$char_traits@_W@std@@SAPA_WPA_WI_W@Z */
266 /* ?assign@?$char_traits@_W@std@@SAPEA_WPEA_W_K_W@Z */
267 wchar_t* CDECL MSVCP_char_traits_wchar_assignn(wchar_t *str,
268 MSVCP_size_t num, wchar_t c)
278 /* ?to_char_type@?$char_traits@_W@std@@SA_WABG@Z */
279 /* ?to_char_type@?$char_traits@_W@std@@SA_WAEBG@Z */
280 wchar_t CDECL MSVCP_char_traits_wchar_to_char_type(const unsigned short *i)
285 /* ?to_int_type@?$char_traits@_W@std@@SAGAB_W@Z */
286 /* ?to_int_type@?$char_traits@_W@std@@SAGAEB_W@Z */
287 unsigned short CDECL MSVCP_char_traits_wchar_to_int_type(const wchar_t *ch)
292 /* ?eq_int_type@?$char_traits@_W@std@@SA_NABG0@Z */
293 /* ?eq_int_type@?$char_traits@_W@std@@SA_NAEBG0@Z */
294 MSVCP_bool CDECL MSVCP_char_traits_wchar_eq_int_tpe(const unsigned short *i1,
295 const unsigned short *i2)
300 /* ?eof@?$char_traits@_W@std@@SAGXZ */
301 unsigned short CDECL MSVCP_char_traits_wchar_eof(void)
306 /* ?not_eof@?$char_traits@_W@std@@SAGABG@Z */
307 /* ?not_eof@?$char_traits@_W@std@@SAGAEBG@Z */
308 unsigned short CDECL MSVCP_char_traits_wchar_not_eof(const unsigned short *in)
310 return (*in==WEOF ? !WEOF : *in);
314 /* char_traits<unsigned short> */
315 /* ?assign@?$char_traits@G@std@@SAXAAGABG@Z */
316 /* ?assign@?$char_traits@G@std@@SAXAEAGAEBG@Z */
317 void CDECL MSVCP_char_traits_short_assign(unsigned short *ch,
318 const unsigned short *assign)
323 /* ?eq@?$char_traits@G@std@@SA_NABG0@Z */
324 /* ?eq@?$char_traits@G@std@@SA_NAEBG0@Z */
325 MSVCP_bool CDECL MSVCP_char_traits_short_eq(const unsigned short *ch1,
326 const unsigned short *ch2)
331 /* ?lt@?$char_traits@G@std@@SA_NABG0@Z */
332 /* ?lt@?$char_traits@G@std@@SA_NAEBG0@Z */
333 MSVCP_bool CDECL MSVCP_char_traits_short_lt(const unsigned short *ch1,
334 const unsigned short *ch2)
339 /* ?compare@?$char_traits@G@std@@SAHPBG0I@Z */
340 /* ?compare@?$char_traits@G@std@@SAHPEBG0_K@Z */
341 int CDECL MSVCP_char_traits_short_compare(const unsigned short *s1,
342 const unsigned short *s2, MSVCP_size_t count)
346 for(i=0; i<count; i++)
348 return (s1[i] < s2[i] ? -1 : 1);
353 /* ?length@?$char_traits@G@std@@SAIPBG@Z */
354 /* ?length@?$char_traits@G@std@@SA_KPEBG@Z */
355 MSVCP_size_t CDECL MSVCP_char_traits_short_length(const unsigned short *str)
359 for(len=0; str[len]; len++);
364 /* ?_Copy_s@?$char_traits@G@std@@SAPAGPAGIPBGI@Z */
365 /* ?_Copy_s@?$char_traits@G@std@@SAPEAGPEAG_KPEBG1@Z */
366 unsigned short * CDECL MSVCP_char_traits_short__Copy_s(unsigned short *dest,
367 MSVCP_size_t size, const unsigned short *src, MSVCP_size_t count)
370 _invalid_parameter(NULL, NULL, NULL, 0, 0);
374 return memcpy(dest, src, sizeof(unsigned short[count]));
377 /* ?copy@?$char_traits@G@std@@SAPAGPAGPBGI@Z */
378 /* ?copy@?$char_traits@G@std@@SAPEAGPEAGPEBG_K@Z */
379 unsigned short* CDECL MSVCP_char_traits_short_copy(unsigned short *dest,
380 const unsigned short *src, MSVCP_size_t count)
382 return MSVCP_char_traits_short__Copy_s(dest, count, src, count);
385 /* ?find@?$char_traits@G@std@@SAPBGPBGIABG@Z */
386 /* ?find@?$char_traits@G@std@@SAPEBGPEBG_KAEBG@Z */
387 const unsigned short* CDECL MSVCP_char_traits_short_find(
388 const unsigned short *str, MSVCP_size_t range, const unsigned short *c)
392 for(i=0; i<range; i++)
399 /* ?_Move_s@?$char_traits@G@std@@SAPAGPAGIPBGI@Z */
400 /* ?_Move_s@?$char_traits@G@std@@SAPEAGPEAG_KPEBG1@Z */
401 unsigned short* CDECL MSVCP_char_traits_short__Move_s(unsigned short *dest,
402 MSVCP_size_t size, const unsigned short *src, MSVCP_size_t count)
405 _invalid_parameter(NULL, NULL, NULL, 0, 0);
409 return memmove(dest, src, sizeof(unsigned short[count]));
412 /* ?move@?$char_traits@G@std@@SAPAGPAGPBGI@Z */
413 /* ?move@?$char_traits@G@std@@SAPEAGPEAGPEBG_K@Z */
414 unsigned short* CDECL MSVCP_char_traits_short_move(unsigned short *dest,
415 const unsigned short *src, MSVCP_size_t count)
417 return MSVCP_char_traits_short__Move_s(dest, count, src, count);
420 /* ?assign@?$char_traits@G@std@@SAPAGPAGIG@Z */
421 /* ?assign@?$char_traits@G@std@@SAPEAGPEAG_KG@Z */
422 unsigned short* CDECL MSVCP_char_traits_short_assignn(unsigned short *str,
423 MSVCP_size_t num, unsigned short c)
433 /* ?to_char_type@?$char_traits@G@std@@SAGABG@Z */
434 /* ?to_char_type@?$char_traits@G@std@@SAGAEBG@Z */
435 unsigned short CDECL MSVCP_char_traits_short_to_char_type(const unsigned short *i)
440 /* ?to_int_type@?$char_traits@G@std@@SAGABG@Z */
441 /* ?to_int_type@?$char_traits@G@std@@SAGAEBG@Z */
442 unsigned short CDECL MSVCP_char_traits_short_to_int_type(const unsigned short *ch)
447 /* ?eq_int_type@?$char_traits@G@std@@SA_NABG0@Z */
448 /* ?eq_int_type@?$char_traits@G@std@@SA_NAEBG0@Z */
449 MSVCP_bool CDECL MSVCP_char_traits_short_eq_int_type(unsigned short *i1,
455 /* ?eof@?$char_traits@G@std@@SAGXZ */
456 unsigned short CDECL MSVCP_char_traits_short_eof(void)
461 /* ?not_eof@?$char_traits@G@std@@SAGABG@Z */
462 /* ?not_eof@?$char_traits@G@std@@SAGAEBG@Z */
463 unsigned short CDECL MSVCP_char_traits_short_not_eof(const unsigned short *in)
465 return (*in==(unsigned short)-1 ? 0 : *in);
470 /* ?_Xlen@_String_base@std@@SAXXZ */
471 void CDECL MSVCP__String_base_Xlen(void)
473 static const char msg[] = "string too long";
476 throw_exception(EXCEPTION_LENGTH_ERROR, msg);
479 /* ?_Xran@_String_base@std@@SAXXZ */
480 void CDECL MSVCP__String_base_Xran(void)
482 static const char msg[] = "invalid string position";
485 throw_exception(EXCEPTION_OUT_OF_RANGE, msg);
488 /* ?_Xinvarg@_String_base@std@@SAXXZ */
489 void CDECL MSVCP__String_base_Xinvarg(void)
491 static const char msg[] = "invalid string argument";
494 throw_exception(EXCEPTION_INVALID_ARGUMENT, msg);
498 /* basic_string<char, char_traits<char>, allocator<char>> */
499 /* ?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2IB */
500 /* ?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2_KB */
501 const MSVCP_size_t MSVCP_basic_string_char_npos = -1;
503 /* ?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEPADXZ */
504 /* ?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAPEADXZ */
505 DEFINE_THISCALL_WRAPPER(basic_string_char_ptr, 4)
506 char* __thiscall basic_string_char_ptr(basic_string_char *this)
508 if(this->res == BUF_SIZE_CHAR-1)
509 return this->data.buf;
510 return this->data.ptr;
513 /* ?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IBEPBDXZ */
514 /* ?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEBAPEBDXZ */
515 DEFINE_THISCALL_WRAPPER(basic_string_char_const_ptr, 4)
516 const char* __thiscall basic_string_char_const_ptr(const basic_string_char *this)
518 if(this->res == BUF_SIZE_CHAR-1)
519 return this->data.buf;
520 return this->data.ptr;
523 /* ?_Eos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXI@Z */
524 /* ?_Eos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAX_K@Z */
525 DEFINE_THISCALL_WRAPPER(basic_string_char_eos, 8)
526 void __thiscall basic_string_char_eos(basic_string_char *this, MSVCP_size_t len)
528 static const char nullbyte = '\0';
531 MSVCP_char_traits_char_assign(basic_string_char_ptr(this)+len, &nullbyte);
534 /* ?_Inside@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAE_NPBD@Z */
535 /* ?_Inside@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAA_NPEBD@Z */
536 DEFINE_THISCALL_WRAPPER(basic_string_char_inside, 8)
537 MSVCP_bool __thiscall basic_string_char_inside(
538 basic_string_char *this, const char *ptr)
540 char *cstr = basic_string_char_ptr(this);
542 return (ptr<cstr || ptr>=cstr+this->size) ? FALSE : TRUE;
545 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEX_NI@Z */
546 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAX_N_K@Z */
547 DEFINE_THISCALL_WRAPPER(basic_string_char_tidy, 12)
548 void __thiscall basic_string_char_tidy(basic_string_char *this,
549 MSVCP_bool built, MSVCP_size_t new_size)
551 if(built && BUF_SIZE_CHAR<=this->res) {
552 char *ptr = this->data.ptr;
555 MSVCP_char_traits_char__Copy_s(this->data.buf, BUF_SIZE_CHAR, ptr, new_size);
556 MSVCP_allocator_char_deallocate(this->allocator, ptr, this->res+1);
559 this->res = BUF_SIZE_CHAR-1;
560 basic_string_char_eos(this, new_size);
563 /* Exported only from msvcp60/70 */
564 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEX_N@Z */
565 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAX_N@Z */
566 DEFINE_THISCALL_WRAPPER(basic_string_char_tidy_built, 8)
567 void __thiscall basic_string_char_tidy_built(basic_string_char *this, MSVCP_bool built)
569 return basic_string_char_tidy(this, built, 0);
572 /* ?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAE_NI_N@Z */
573 /* ?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAA_N_K_N@Z */
574 DEFINE_THISCALL_WRAPPER(basic_string_char_grow, 12)
575 MSVCP_bool __thiscall basic_string_char_grow(
576 basic_string_char *this, MSVCP_size_t new_size, MSVCP_bool trim)
578 if(this->res < new_size) {
579 MSVCP_size_t new_res = new_size;
584 if(new_res/3 < this->res/2)
585 new_res = this->res + this->res/2;
587 ptr = MSVCP_allocator_char_allocate(this->allocator, new_res);
589 ptr = MSVCP_allocator_char_allocate(this->allocator, new_size+1);
593 ERR("Out of memory\n");
594 basic_string_char_tidy(this, TRUE, 0);
598 MSVCP_char_traits_char__Copy_s(ptr, new_size,
599 basic_string_char_ptr(this), this->size);
600 basic_string_char_tidy(this, TRUE, 0);
601 this->data.ptr = ptr;
602 this->res = new_size;
603 basic_string_char_eos(this, this->size);
604 } else if(trim && new_size < BUF_SIZE_CHAR)
605 basic_string_char_tidy(this, TRUE,
606 new_size<this->size ? new_size : this->size);
607 else if(new_size == 0)
608 basic_string_char_eos(this, 0);
613 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z */
614 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0@Z */
615 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_erase, 12)
616 basic_string_char* __thiscall MSVCP_basic_string_char_erase(
617 basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t len)
619 TRACE("%p %lu %lu\n", this, pos, len);
621 if(pos > this->size) {
622 MSVCP__String_base_Xran();
626 if(len > this->size-pos)
627 len = this->size-pos;
630 MSVCP_char_traits_char__Move_s(basic_string_char_ptr(this)+pos,
631 this->res-pos, basic_string_char_ptr(this)+pos+len,
633 basic_string_char_eos(this, this->size-len);
639 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */
640 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
641 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_substr, 16)
642 basic_string_char* __thiscall MSVCP_basic_string_char_assign_substr(
643 basic_string_char *this, const basic_string_char *assign,
644 MSVCP_size_t pos, MSVCP_size_t len)
646 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
648 if(assign->size < pos) {
649 MSVCP__String_base_Xran();
653 if(len > assign->size-pos)
654 len = assign->size-pos;
657 MSVCP_basic_string_char_erase(this, pos+len, MSVCP_basic_string_char_npos);
658 MSVCP_basic_string_char_erase(this, 0, pos);
659 } else if(basic_string_char_grow(this, len, FALSE)) {
660 MSVCP_char_traits_char__Copy_s(basic_string_char_ptr(this),
661 this->res, basic_string_char_const_ptr(assign)+pos, len);
662 basic_string_char_eos(this, len);
668 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */
669 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */
670 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z */
671 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@AEBV01@@Z */
672 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign, 8)
673 basic_string_char* __thiscall MSVCP_basic_string_char_assign(
674 basic_string_char *this, const basic_string_char *assign)
676 return MSVCP_basic_string_char_assign_substr(this, assign,
677 0, MSVCP_basic_string_char_npos);
680 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z */
681 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z */
682 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_cstr_len, 12)
683 basic_string_char* __thiscall MSVCP_basic_string_char_assign_cstr_len(
684 basic_string_char *this, const char *str, MSVCP_size_t len)
686 TRACE("%p %s %lu\n", this, debugstr_a(str), len);
688 if(basic_string_char_inside(this, str))
689 return MSVCP_basic_string_char_assign_substr(this, this,
690 str-basic_string_char_ptr(this), len);
691 else if(basic_string_char_grow(this, len, FALSE)) {
692 MSVCP_char_traits_char__Copy_s(basic_string_char_ptr(this),
693 this->res, str, len);
694 basic_string_char_eos(this, len);
700 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z */
701 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD@Z */
702 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z */
703 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@PEBD@Z */
704 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_cstr, 8)
705 basic_string_char* __thiscall MSVCP_basic_string_char_assign_cstr(
706 basic_string_char *this, const char *str)
708 return MSVCP_basic_string_char_assign_cstr_len(this, str,
709 MSVCP_char_traits_char_length(str));
712 /* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
713 /* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
714 /* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
715 /* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
716 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_c_str, 4)
717 const char* __thiscall MSVCP_basic_string_char_c_str(basic_string_char *this)
720 return basic_string_char_const_ptr(this);
723 /* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
724 /* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
725 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_capacity, 4)
726 MSVCP_size_t __thiscall MSVCP_basic_string_char_capacity(basic_string_char *this)
732 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ */
733 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@XZ */
734 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor, 4)
735 basic_string_char* __thiscall MSVCP_basic_string_char_ctor(basic_string_char *this)
739 basic_string_char_tidy(this, FALSE, 0);
743 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z */
744 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@@Z */
745 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_copy_ctor, 8)
746 basic_string_char* __thiscall MSVCP_basic_string_char_copy_ctor(
747 basic_string_char *this, const basic_string_char *copy)
749 TRACE("%p %p\n", this, copy);
751 basic_string_char_tidy(this, FALSE, 0);
752 MSVCP_basic_string_char_assign(this, copy);
756 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z */
757 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD@Z */
758 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_cstr, 8)
759 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr(
760 basic_string_char *this, const char *str)
762 TRACE("%p %s\n", this, debugstr_a(str));
764 basic_string_char_tidy(this, FALSE, 0);
765 MSVCP_basic_string_char_assign_cstr(this, str);
769 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDI@Z */
770 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD_K@Z */
771 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_cstr_len, 12)
772 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_len(
773 basic_string_char *this, const char *str, MSVCP_size_t len)
775 TRACE("%p %s %ld\n", this, str, len);
777 basic_string_char_tidy(this, FALSE, 0);
778 MSVCP_basic_string_char_assign_cstr_len(this, str, len);
782 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@II@Z */
783 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@_K1@Z */
784 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_substr, 16)
785 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_substr(
786 basic_string_char *this, const basic_string_char *assign,
787 MSVCP_size_t pos, MSVCP_size_t len)
789 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
791 basic_string_char_tidy(this, FALSE, 0);
792 MSVCP_basic_string_char_assign_substr(this, assign, pos, len);
796 /* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ */
797 /* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@XZ */
798 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_dtor, 4)
799 void __thiscall MSVCP_basic_string_char_dtor(basic_string_char *this)
802 basic_string_char_tidy(this, TRUE, 0);
805 /* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
806 /* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
807 /* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
808 /* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
809 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_length, 4)
810 MSVCP_size_t __thiscall MSVCP_basic_string_char_length(basic_string_char *this)
816 /* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXAAV12@@Z */
817 /* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEAV12@@Z */
818 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_swap, 8)
819 void __thiscall MSVCP_basic_string_char_swap(basic_string_char *this, basic_string_char *str)
822 char tmp[sizeof(this->data)];
823 const MSVCP_size_t size = this->size;
824 const MSVCP_size_t res = this->res;
826 memcpy(tmp, this->data.buf, sizeof(this->data));
827 memcpy(this->data.buf, str->data.buf, sizeof(this->data));
828 memcpy(str->data.buf, tmp, sizeof(this->data));
830 this->size = str->size;
831 this->res = str->res;
838 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */
839 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
840 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_substr, 16)
841 basic_string_char* __thiscall MSVCP_basic_string_char_append_substr(basic_string_char *this,
842 const basic_string_char *append, MSVCP_size_t offset, MSVCP_size_t count)
844 TRACE("%p %p %lu %lu\n", this, append, offset, count);
846 if(append->size < offset)
847 MSVCP__String_base_Xran();
849 if(count > append->size-offset)
850 count = append->size-offset;
852 if(MSVCP_basic_string_char_npos-this->size<=count || this->size+count<this->size)
853 MSVCP__String_base_Xlen();
855 if(basic_string_char_grow(this, this->size+count, FALSE)) {
856 MSVCP_char_traits_char__Copy_s(basic_string_char_ptr(this)+this->size,
857 this->res-this->size, basic_string_char_const_ptr(append)+offset, count);
858 basic_string_char_eos(this, this->size+count);
864 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */
865 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */
866 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z */
867 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@AEBV01@@Z */
868 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append, 8)
869 basic_string_char* __thiscall MSVCP_basic_string_char_append(
870 basic_string_char *this, const basic_string_char *append)
872 return MSVCP_basic_string_char_append_substr(this, append,
873 0, MSVCP_basic_string_char_npos);
876 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z */
877 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z */
878 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_cstr_len, 12)
879 basic_string_char* __thiscall MSVCP_basic_string_char_append_cstr_len(
880 basic_string_char *this, const char *append, MSVCP_size_t count)
882 TRACE("%p %s %lu\n", this, append, count);
884 if(basic_string_char_inside(this, append))
885 return MSVCP_basic_string_char_append_substr(this, this,
886 append-basic_string_char_ptr(this), count);
888 if(MSVCP_basic_string_char_npos-this->size<=count || this->size+count<this->size)
889 MSVCP__String_base_Xlen();
891 if(basic_string_char_grow(this, this->size+count, FALSE)) {
892 MSVCP_char_traits_char__Copy_s(basic_string_char_ptr(this)+this->size,
893 this->res-this->size, append, count);
894 basic_string_char_eos(this, this->size+count);
900 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z */
901 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD@Z */
902 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z */
903 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@PEBD@Z */
904 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_cstr, 8)
905 basic_string_char* __thiscall MSVCP_basic_string_char_append_cstr(
906 basic_string_char *this, const char *append)
908 return MSVCP_basic_string_char_append_cstr_len(this, append,
909 MSVCP_char_traits_char_length(append));
912 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */
913 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KD@Z */
914 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_len_ch, 12)
915 basic_string_char* __thiscall MSVCP_basic_string_char_append_len_ch(
916 basic_string_char *this, MSVCP_size_t count, char ch)
918 TRACE("%p %lu %c\n", this, count, ch);
920 if(MSVCP_basic_string_char_npos-this->size <= count)
921 MSVCP__String_base_Xlen();
923 if(basic_string_char_grow(this, this->size+count, FALSE)) {
924 MSVCP_char_traits_char_assignn(basic_string_char_ptr(this)+this->size, count, ch);
925 basic_string_char_eos(this, this->size+count);
931 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@D@Z */
932 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@D@Z */
933 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_ch, 8)
934 basic_string_char* __thiscall MSVCP_basic_string_char_append_ch(
935 basic_string_char *this, char ch)
937 return MSVCP_basic_string_char_append_len_ch(this, 1, ch);
940 /* ??$?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 */
941 /* ??$?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 */
942 basic_string_char* __cdecl MSVCP_basic_string_char_concatenate_bstr_cstr(basic_string_char *ret,
943 const basic_string_char *left, const char *right)
945 TRACE("%p %s\n", left, right);
947 MSVCP_basic_string_char_copy_ctor(ret, left);
948 MSVCP_basic_string_char_append_cstr(ret, right);
952 /* ??$?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 */
953 /* ??$?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 */
954 basic_string_char* __cdecl MSVCP_basic_string_char_concatenate_cstr_bstr(basic_string_char *ret,
955 const char *left, const basic_string_char *right)
957 TRACE("%s %p\n", left, right);
959 MSVCP_basic_string_char_ctor_cstr(ret, left);
960 MSVCP_basic_string_char_append(ret, right);
964 /* ??$?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 */
965 /* ??$?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 */
966 basic_string_char* __cdecl MSVCP_basic_string_char_concatenate(basic_string_char *ret,
967 const basic_string_char *left, const basic_string_char *right)
969 TRACE("%p %p\n", left, right);
971 MSVCP_basic_string_char_copy_ctor(ret, left);
972 MSVCP_basic_string_char_append(ret, right);
976 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIPBDI@Z */
977 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0PEBD0@Z */
978 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_substr_cstr_len, 20)
979 int __thiscall MSVCP_basic_string_char_compare_substr_cstr_len(
980 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
981 const char *str, MSVCP_size_t count)
985 TRACE("%p %lu %lu %s %lu\n", this, pos, num, str, count);
988 MSVCP__String_base_Xran();
990 if(pos+num > this->size)
991 num = this->size-pos;
993 ans = MSVCP_char_traits_char_compare(basic_string_char_const_ptr(this)+pos,
994 str, num>count ? count : num);
1000 else if(num < count)
1005 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIPBD@Z */
1006 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0PEBD@Z */
1007 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_substr_cstr, 16)
1008 int __thiscall MSVCP_basic_string_char_compare_substr_cstr(const basic_string_char *this,
1009 MSVCP_size_t pos, MSVCP_size_t num, const char *str)
1011 return MSVCP_basic_string_char_compare_substr_cstr_len(this, pos, num,
1012 str, MSVCP_char_traits_char_length(str));
1015 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHPBD@Z */
1016 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAHPEBD@Z */
1017 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_cstr, 8)
1018 int __thiscall MSVCP_basic_string_char_compare_cstr(
1019 const basic_string_char *this, const char *str)
1021 return MSVCP_basic_string_char_compare_substr_cstr_len(this, 0, this->size,
1022 str, MSVCP_char_traits_char_length(str));
1025 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIABV12@II@Z */
1026 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0AEBV12@00@Z */
1027 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_substr_substr, 24)
1028 int __thiscall MSVCP_basic_string_char_compare_substr_substr(
1029 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
1030 const basic_string_char *compare, MSVCP_size_t off, MSVCP_size_t count)
1032 TRACE("%p %lu %lu %p %lu %lu\n", this, pos, num, compare, off, count);
1034 if(compare->size < off)
1035 MSVCP__String_base_Xran();
1037 if(off+count > compare->size)
1038 count = compare->size-off;
1040 return MSVCP_basic_string_char_compare_substr_cstr_len(this, pos, num,
1041 basic_string_char_const_ptr(compare)+off, count);
1044 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIABV12@@Z */
1045 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0AEBV12@@Z */
1046 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_substr, 16)
1047 int __thiscall MSVCP_basic_string_char_compare_substr(
1048 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
1049 const basic_string_char *compare)
1051 return MSVCP_basic_string_char_compare_substr_cstr_len(this, pos, num,
1052 basic_string_char_const_ptr(compare), compare->size);
1055 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHABV12@@Z */
1056 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAHAEBV12@@Z */
1057 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare, 8)
1058 int __thiscall MSVCP_basic_string_char_compare(
1059 const basic_string_char *this, const basic_string_char *compare)
1061 return MSVCP_basic_string_char_compare_substr_cstr_len(this, 0, this->size,
1062 basic_string_char_const_ptr(compare), compare->size);
1065 /* ??$?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 */
1066 /* ??$?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 */
1067 MSVCP_bool __cdecl MSVCP_basic_string_char_equal(
1068 const basic_string_char *left, const basic_string_char *right)
1070 return MSVCP_basic_string_char_compare(left, right) == 0;
1073 /* ??$?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 */
1074 /* ??$?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 */
1075 MSVCP_bool __cdecl MSVCP_basic_string_char_equal_str_cstr(
1076 const basic_string_char *left, const char *right)
1078 return MSVCP_basic_string_char_compare_cstr(left, right) == 0;
1081 /* ??$?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 */
1082 /* ??$?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 */
1083 MSVCP_bool __cdecl MSVCP_basic_string_char_equal_cstr_str(
1084 const char *left, const basic_string_char *right)
1086 return MSVCP_basic_string_char_compare_cstr(right, left) == 0;
1089 /* ??$?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 */
1090 /* ??$?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 */
1091 MSVCP_bool __cdecl MSVCP_basic_string_char_not_equal(
1092 const basic_string_char *left, const basic_string_char *right)
1094 return MSVCP_basic_string_char_compare(left, right) != 0;
1097 /* ??$?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 */
1098 /* ??$?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 */
1099 MSVCP_bool __cdecl MSVCP_basic_string_char_not_equal_str_cstr(
1100 const basic_string_char *left, const char *right)
1102 return MSVCP_basic_string_char_compare_cstr(left, right) != 0;
1105 /* ??$?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 */
1106 /* ??$?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 */
1107 MSVCP_bool __cdecl MSVCP_basic_string_char_not_equal_cstr_str(
1108 const char *left, const basic_string_char *right)
1110 return MSVCP_basic_string_char_compare_cstr(right, left) != 0;
1113 /* ??$?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 */
1114 /* ??$?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 */
1115 MSVCP_bool __cdecl MSVCP_basic_string_char_lower(
1116 const basic_string_char *left, const basic_string_char *right)
1118 return MSVCP_basic_string_char_compare(left, right) < 0;
1121 /* ??$?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 */
1122 /* ??$?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 */
1123 MSVCP_bool __cdecl MSVCP_basic_string_char_lower_bstr_cstr(
1124 const basic_string_char *left, const char *right)
1126 return MSVCP_basic_string_char_compare_cstr(left, right) < 0;
1129 /* ??$?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 */
1130 /* ??$?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 */
1131 MSVCP_bool __cdecl MSVCP_basic_string_char_lower_cstr_bstr(
1132 const char *left, const basic_string_char *right)
1134 return MSVCP_basic_string_char_compare_cstr(right, left) > 0;
1137 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1138 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1139 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_cstr_substr, 16)
1140 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_cstr_substr(
1141 const basic_string_char *this, const char *find, MSVCP_size_t pos, MSVCP_size_t len)
1143 const char *p, *end;
1145 TRACE("%p %s %lu %lu\n", this, find, pos, len);
1147 if(len==0 && pos<=this->size)
1150 end = basic_string_char_const_ptr(this)+this->size-len+1;
1151 for(p=basic_string_char_const_ptr(this)+pos; p<end; p++) {
1152 p = MSVCP_char_traits_char_find(p, end-p, find);
1156 if(!MSVCP_char_traits_char_compare(p, find, len))
1157 return p-basic_string_char_const_ptr(this);
1160 return MSVCP_basic_string_char_npos;
1163 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1164 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1165 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_ch, 12)
1166 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_ch(
1167 const basic_string_char *this, char ch, MSVCP_size_t pos)
1169 return MSVCP_basic_string_char_find_cstr_substr(this, &ch, pos, 1);
1172 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1173 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1174 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_of_cstr_substr, 16)
1175 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_of_cstr_substr(
1176 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
1178 const char *p, *end;
1180 TRACE("%p %p %lu %lu\n", this, find, off, len);
1182 if(len>0 && off<this->size) {
1183 end = basic_string_char_const_ptr(this)+this->size;
1184 for(p=basic_string_char_const_ptr(this)+off; p<end; p++)
1185 if(MSVCP_char_traits_char_find(find, len, p))
1186 return p-basic_string_char_const_ptr(this);
1189 return MSVCP_basic_string_char_npos;
1192 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1193 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1194 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_of, 12)
1195 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_of(
1196 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1198 return MSVCP_basic_string_char_find_first_of_cstr_substr(this,
1199 basic_string_char_const_ptr(find), off, find->size);
1202 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1203 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1204 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_of_cstr, 12)
1205 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_of_cstr(
1206 const basic_string_char *this, const char *find, MSVCP_size_t off)
1208 return MSVCP_basic_string_char_find_first_of_cstr_substr(
1209 this, find, off, MSVCP_char_traits_char_length(find));
1212 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1213 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1214 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_of_ch, 12)
1215 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_of_ch(
1216 const basic_string_char *this, char ch, MSVCP_size_t off)
1218 return MSVCP_basic_string_char_find_first_of_cstr_substr(this, &ch, off, 1);
1221 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1222 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1223 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_of_cstr_substr, 16)
1224 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_of_cstr_substr(
1225 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
1227 const char *p, *beg;
1229 TRACE("%p %p %lu %lu\n", this, find, off, len);
1232 if(len>0 && this->size>0) {
1233 if(off >= this->size)
1236 beg = basic_string_char_const_ptr(this);
1237 for(p=beg+off; p>=beg; p--)
1238 if(MSVCP_char_traits_char_find(find, len, p))
1242 return MSVCP_basic_string_char_npos;
1245 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1246 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1247 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_of, 12)
1248 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_of(
1249 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1251 return MSVCP_basic_string_char_find_last_of_cstr_substr(this,
1252 basic_string_char_const_ptr(find), off, find->size);
1255 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1256 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1257 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_of_cstr, 12)
1258 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_of_cstr(
1259 const basic_string_char *this, const char *find, MSVCP_size_t off)
1261 return MSVCP_basic_string_char_find_last_of_cstr_substr(
1262 this, find, off, MSVCP_char_traits_char_length(find));
1265 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1266 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1267 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_of_ch, 12)
1268 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_of_ch(
1269 const basic_string_char *this, char ch, MSVCP_size_t off)
1271 return MSVCP_basic_string_char_find_last_of_cstr_substr(this, &ch, off, 1);
1274 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */
1275 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */
1276 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */
1277 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */
1278 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_at, 8)
1279 char* __thiscall MSVCP_basic_string_char_at(
1280 basic_string_char *this, MSVCP_size_t pos)
1282 TRACE("%p %lu\n", this, pos);
1284 if(this->size <= pos)
1285 MSVCP__String_base_Xran();
1287 return basic_string_char_ptr(this)+pos;
1290 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */
1291 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */
1292 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */
1293 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */
1294 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_const_at, 8)
1295 const char* __thiscall MSVCP_basic_string_char_const_at(
1296 const basic_string_char *this, MSVCP_size_t pos)
1298 TRACE("%p %lu\n", this, pos);
1300 if(this->size <= pos)
1301 MSVCP__String_base_Xran();
1303 return basic_string_char_const_ptr(this)+pos;
1306 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXID@Z */
1307 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_KD@Z */
1308 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_resize_ch, 12)
1309 void __thiscall MSVCP_basic_string_char_resize_ch(
1310 basic_string_char *this, MSVCP_size_t size, char ch)
1312 TRACE("%p %lu %c\n", this, size, ch);
1314 if(size <= this->size)
1315 MSVCP_basic_string_char_erase(this, size, this->size);
1317 MSVCP_basic_string_char_append_len_ch(this, size-this->size, ch);
1320 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z */
1321 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z */
1322 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_resize, 8)
1323 void __thiscall MSVCP_basic_string_char_resize(
1324 basic_string_char *this, MSVCP_size_t size)
1326 MSVCP_basic_string_char_resize_ch(this, size, '\0');
1329 /* ?clear@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
1330 /* ?clear@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
1331 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_clear, 4)
1332 void __thiscall MSVCP_basic_string_char_clear(basic_string_char *this)
1334 basic_string_char_eos(this, 0);
1338 /* basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t>> */
1339 /* ?npos@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@2IB */
1340 /* ?npos@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@2_KB */
1341 const MSVCP_size_t MSVCP_basic_string_wchar_npos = -1;
1343 /* ?_Myptr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEPA_WXZ */
1344 /* ?_Myptr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAPEA_WXZ */
1345 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ptr, 4)
1346 wchar_t* __thiscall basic_string_wchar_ptr(basic_string_wchar *this)
1348 if(this->res == BUF_SIZE_WCHAR-1)
1349 return this->data.buf;
1350 return this->data.ptr;
1353 /* ?_Myptr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IBEPB_WXZ */
1354 /* ?_Myptr@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEBAPEB_WXZ */
1355 DEFINE_THISCALL_WRAPPER(basic_string_wchar_const_ptr, 4)
1356 const wchar_t* __thiscall basic_string_wchar_const_ptr(const basic_string_wchar *this)
1358 if(this->res == BUF_SIZE_WCHAR-1)
1359 return this->data.buf;
1360 return this->data.ptr;
1363 /* ?_Eos@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXI@Z */
1364 /* ?_Eos@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAX_K@Z */
1365 DEFINE_THISCALL_WRAPPER(basic_string_wchar_eos, 8)
1366 void __thiscall basic_string_wchar_eos(basic_string_wchar *this, MSVCP_size_t len)
1368 static const wchar_t nullbyte_w = '\0';
1371 MSVCP_char_traits_wchar_assign(basic_string_wchar_ptr(this)+len, &nullbyte_w);
1374 /* ?_Inside@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAE_NPB_W@Z */
1375 /* ?_Inside@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAA_NPEB_W@Z */
1376 DEFINE_THISCALL_WRAPPER(basic_string_wchar_inside, 8)
1377 MSVCP_bool __thiscall basic_string_wchar_inside(
1378 basic_string_wchar *this, const wchar_t *ptr)
1380 wchar_t *cstr = basic_string_wchar_ptr(this);
1382 return (ptr<cstr || ptr>=cstr+this->size) ? FALSE : TRUE;
1385 /* ?_Tidy@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEX_NI@Z */
1386 /* ?_Tidy@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAX_N_K@Z */
1387 DEFINE_THISCALL_WRAPPER(basic_string_wchar_tidy, 12)
1388 void __thiscall basic_string_wchar_tidy(basic_string_wchar *this,
1389 MSVCP_bool built, MSVCP_size_t new_size)
1391 if(built && BUF_SIZE_WCHAR<=this->res) {
1392 wchar_t *ptr = this->data.ptr;
1395 MSVCP_char_traits_wchar__Copy_s(this->data.buf, BUF_SIZE_WCHAR, ptr, new_size);
1396 MSVCP_allocator_wchar_deallocate(this->allocator, ptr, this->res+1);
1399 this->res = BUF_SIZE_WCHAR-1;
1400 basic_string_wchar_eos(this, new_size);
1403 /* ?_Grow@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAE_NI_N@Z */
1404 /* ?_Grow@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAA_N_K_N@Z */
1405 DEFINE_THISCALL_WRAPPER(basic_string_wchar_grow, 12)
1406 MSVCP_bool __thiscall basic_string_wchar_grow(
1407 basic_string_wchar *this, MSVCP_size_t new_size, MSVCP_bool trim)
1409 if(this->res < new_size) {
1410 MSVCP_size_t new_res = new_size;
1415 if(new_res/3 < this->res/2)
1416 new_res = this->res + this->res/2;
1418 ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_res);
1420 ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_size+1);
1424 ERR("Out of memory\n");
1425 basic_string_wchar_tidy(this, TRUE, 0);
1429 MSVCP_char_traits_wchar__Copy_s(ptr, new_size,
1430 basic_string_wchar_ptr(this), this->size);
1431 basic_string_wchar_tidy(this, TRUE, 0);
1432 this->data.ptr = ptr;
1433 this->res = new_size;
1434 basic_string_wchar_eos(this, this->size);
1435 } else if(trim && new_size < BUF_SIZE_WCHAR)
1436 basic_string_wchar_tidy(this, TRUE,
1437 new_size<this->size ? new_size : this->size);
1438 else if(new_size == 0)
1439 basic_string_wchar_eos(this, 0);
1441 return (new_size>0);
1444 /* ?erase@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@II@Z */
1445 /* ?erase@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K0@Z */
1446 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_erase, 12)
1447 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_erase(
1448 basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t len)
1450 TRACE("%p %lu %lu\n", this, pos, len);
1452 if(pos > this->size) {
1453 MSVCP__String_base_Xran();
1457 if(len > this->size-pos)
1458 len = this->size-pos;
1461 MSVCP_char_traits_wchar__Move_s(basic_string_wchar_ptr(this)+pos,
1462 this->res-pos, basic_string_wchar_ptr(this)+pos+len,
1463 this->size-pos-len);
1464 basic_string_wchar_eos(this, this->size-len);
1470 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@ABV12@II@Z */
1471 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
1472 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_substr, 16)
1473 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_substr(
1474 basic_string_wchar *this, const basic_string_wchar *assign,
1475 MSVCP_size_t pos, MSVCP_size_t len)
1477 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
1479 if(assign->size < pos) {
1480 MSVCP__String_base_Xran();
1484 if(len > assign->size-pos)
1485 len = assign->size-pos;
1487 if(this == assign) {
1488 MSVCP_basic_string_wchar_erase(this, pos+len, MSVCP_basic_string_wchar_npos);
1489 MSVCP_basic_string_wchar_erase(this, 0, pos);
1490 } else if(basic_string_wchar_grow(this, len, FALSE)) {
1491 MSVCP_char_traits_wchar__Copy_s(basic_string_wchar_ptr(this),
1492 this->res, basic_string_wchar_const_ptr(assign)+pos, len);
1493 basic_string_wchar_eos(this, len);
1499 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@ABV12@@Z */
1500 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@AEBV12@@Z */
1501 /* ??4?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV01@ABV01@@Z */
1502 /* ??4?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV01@AEBV01@@Z */
1503 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign, 8)
1504 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign(
1505 basic_string_wchar *this, const basic_string_wchar *assign)
1507 return MSVCP_basic_string_wchar_assign_substr(this, assign,
1508 0, MSVCP_basic_string_wchar_npos);
1511 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@PB_WI@Z */
1512 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@PEB_W_K@Z */
1513 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_cstr_len, 12)
1514 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_cstr_len(
1515 basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
1517 TRACE("%p %s %lu\n", this, debugstr_w(str), len);
1519 if(basic_string_wchar_inside(this, str))
1520 return MSVCP_basic_string_wchar_assign_substr(this, this,
1521 str-basic_string_wchar_ptr(this), len);
1522 else if(basic_string_wchar_grow(this, len, FALSE)) {
1523 MSVCP_char_traits_wchar__Copy_s(basic_string_wchar_ptr(this),
1524 this->res, str, len);
1525 basic_string_wchar_eos(this, len);
1531 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@PB_W@Z */
1532 /* ?assign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@PEB_W@Z */
1533 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_cstr, 8)
1534 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_cstr(
1535 basic_string_wchar *this, const wchar_t *str)
1537 return MSVCP_basic_string_wchar_assign_cstr_len(this, str,
1538 MSVCP_char_traits_wchar_length(str));
1541 /* ?c_str@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEPB_WXZ */
1542 /* ?c_str@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAPEB_WXZ */
1543 /* ?data@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEPB_WXZ */
1544 /* ?data@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAPEB_WXZ */
1545 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_c_str, 4)
1546 const wchar_t* __thiscall MSVCP_basic_string_wchar_c_str(basic_string_wchar *this)
1548 TRACE("%p\n", this);
1549 return basic_string_wchar_const_ptr(this);
1552 /* ?capacity@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIXZ */
1553 /* ?capacity@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KXZ */
1554 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_capacity, 4)
1555 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_capacity(basic_string_wchar *this)
1557 TRACE("%p\n", this);
1561 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@XZ */
1562 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@XZ */
1563 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor, 4)
1564 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor(basic_string_wchar *this)
1566 TRACE("%p\n", this);
1568 basic_string_wchar_tidy(this, FALSE, 0);
1572 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV01@@Z */
1573 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV01@@Z */
1574 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_copy_ctor, 8)
1575 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_copy_ctor(
1576 basic_string_wchar *this, const basic_string_wchar *copy)
1578 TRACE("%p %p\n", this, copy);
1580 basic_string_wchar_tidy(this, FALSE, 0);
1581 MSVCP_basic_string_wchar_assign(this, copy);
1585 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@PB_W@Z */
1586 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@PEB_W@Z */
1587 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_cstr, 8)
1588 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr(
1589 basic_string_wchar *this, const wchar_t *str)
1591 TRACE("%p %s\n", this, debugstr_w(str));
1593 basic_string_wchar_tidy(this, FALSE, 0);
1594 MSVCP_basic_string_wchar_assign_cstr(this, str);
1598 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@PB_WI@Z */
1599 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@PEB_W_K@Z */
1600 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_cstr_len, 12)
1601 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_len(
1602 basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
1604 TRACE("%p %s %ld\n", this, debugstr_w(str), len);
1606 basic_string_wchar_tidy(this, FALSE, 0);
1607 MSVCP_basic_string_wchar_assign_cstr_len(this, str, len);
1611 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV01@II@Z */
1612 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV01@_K1@Z */
1613 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_substr, 16)
1614 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_substr(
1615 basic_string_wchar *this, const basic_string_wchar *assign,
1616 MSVCP_size_t pos, MSVCP_size_t len)
1618 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
1620 basic_string_wchar_tidy(this, FALSE, 0);
1621 MSVCP_basic_string_wchar_assign_substr(this, assign, pos, len);
1625 /* ??1?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@XZ */
1626 /* ??1?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@XZ */
1627 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_dtor, 4)
1628 void __thiscall MSVCP_basic_string_wchar_dtor(basic_string_wchar *this)
1630 TRACE("%p\n", this);
1631 basic_string_wchar_tidy(this, TRUE, 0);
1634 /* ?size@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIXZ */
1635 /* ?size@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KXZ */
1636 /* ?length@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIXZ */
1637 /* ?length@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KXZ */
1638 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_length, 4)
1639 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_length(basic_string_wchar *this)
1641 TRACE("%p\n", this);
1645 /* ?swap@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXAAV12@@Z */
1646 /* ?swap@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXAEAV12@@Z */
1647 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_swap, 8)
1648 void __thiscall MSVCP_basic_string_wchar_swap(basic_string_wchar *this, basic_string_wchar *str)
1651 char tmp[sizeof(this->data)];
1652 const MSVCP_size_t size = this->size;
1653 const MSVCP_size_t res = this->res;
1655 memcpy(tmp, this->data.buf, sizeof(this->data));
1656 memcpy(this->data.buf, str->data.buf, sizeof(this->data));
1657 memcpy(str->data.buf, tmp, sizeof(this->data));
1659 this->size = str->size;
1660 this->res = str->res;
1667 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@ABV12@II@Z */
1668 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
1669 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_substr, 16)
1670 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_substr(basic_string_wchar *this,
1671 const basic_string_wchar *append, MSVCP_size_t offset, MSVCP_size_t count)
1673 TRACE("%p %p %lu %lu\n", this, append, offset, count);
1675 if(append->size < offset)
1676 MSVCP__String_base_Xran();
1678 if(count > append->size-offset)
1679 count = append->size-offset;
1681 if(MSVCP_basic_string_wchar_npos-this->size<=count || this->size+count<this->size)
1682 MSVCP__String_base_Xlen();
1684 if(basic_string_wchar_grow(this, this->size+count, FALSE)) {
1685 MSVCP_char_traits_wchar__Copy_s(basic_string_wchar_ptr(this)+this->size,
1686 this->res-this->size, basic_string_wchar_const_ptr(append)+offset, count);
1687 basic_string_wchar_eos(this, this->size+count);
1693 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@ABV12@@Z */
1694 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@AEBV12@@Z */
1695 /* ??Y?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV01@ABV01@@Z */
1696 /* ??Y?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV01@AEBV01@@Z */
1697 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append, 8)
1698 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append(
1699 basic_string_wchar *this, const basic_string_wchar *append)
1701 return MSVCP_basic_string_wchar_append_substr(this, append,
1702 0, MSVCP_basic_string_wchar_npos);
1705 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@PB_WI@Z */
1706 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@PEB_W_K@Z */
1707 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_cstr_len, 12)
1708 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_cstr_len(
1709 basic_string_wchar *this, const wchar_t *append, MSVCP_size_t count)
1711 TRACE("%p %s %lu\n", this, debugstr_w(append), count);
1713 if(basic_string_wchar_inside(this, append))
1714 return MSVCP_basic_string_wchar_append_substr(this, this,
1715 append-basic_string_wchar_ptr(this), count);
1717 if(MSVCP_basic_string_wchar_npos-this->size<=count || this->size+count<this->size)
1718 MSVCP__String_base_Xlen();
1720 if(basic_string_wchar_grow(this, this->size+count, FALSE)) {
1721 MSVCP_char_traits_wchar__Copy_s(basic_string_wchar_ptr(this)+this->size,
1722 this->res-this->size, append, count);
1723 basic_string_wchar_eos(this, this->size+count);
1729 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@PB_W@Z */
1730 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@PEB_W@Z */
1731 /* ??Y?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV01@PB_W@Z */
1732 /* ??Y?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV01@PEB_W@Z */
1733 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_cstr, 8)
1734 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_cstr(
1735 basic_string_wchar *this, const wchar_t *append)
1737 return MSVCP_basic_string_wchar_append_cstr_len(this, append,
1738 MSVCP_char_traits_wchar_length(append));
1741 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@I_W@Z */
1742 /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@_K_W@Z */
1743 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_len_ch, 12)
1744 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_len_ch(
1745 basic_string_wchar *this, MSVCP_size_t count, wchar_t ch)
1747 TRACE("%p %lu %c\n", this, count, ch);
1749 if(MSVCP_basic_string_wchar_npos-this->size <= count)
1750 MSVCP__String_base_Xlen();
1752 if(basic_string_wchar_grow(this, this->size+count, FALSE)) {
1753 MSVCP_char_traits_wchar_assignn(basic_string_wchar_ptr(this)+this->size, count, ch);
1754 basic_string_wchar_eos(this, this->size+count);
1760 /* ??Y?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV01@_W@Z */
1761 /* ??Y?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV01@_W@Z */
1762 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_ch, 8)
1763 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_ch(
1764 basic_string_wchar *this, wchar_t ch)
1766 return MSVCP_basic_string_wchar_append_len_ch(this, 1, ch);
1769 /* ??$?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 */
1770 /* ??$?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 */
1771 basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate_bstr_cstr(basic_string_wchar *ret,
1772 const basic_string_wchar *left, const wchar_t *right)
1774 TRACE("%p %s\n", left, debugstr_w(right));
1776 MSVCP_basic_string_wchar_copy_ctor(ret, left);
1777 MSVCP_basic_string_wchar_append_cstr(ret, right);
1781 /* ??$?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 */
1782 /* ??$?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 */
1783 basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate_cstr_bstr(basic_string_wchar *ret,
1784 const wchar_t *left, const basic_string_wchar *right)
1786 TRACE("%s %p\n", debugstr_w(left), right);
1788 MSVCP_basic_string_wchar_ctor_cstr(ret, left);
1789 MSVCP_basic_string_wchar_append(ret, right);
1793 /* ??$?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 */
1794 /* ??$?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 */
1795 basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate(basic_string_wchar *ret,
1796 const basic_string_wchar *left, const basic_string_wchar *right)
1798 TRACE("%p %p\n", left, right);
1800 MSVCP_basic_string_wchar_copy_ctor(ret, left);
1801 MSVCP_basic_string_wchar_append(ret, right);
1805 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEHIIPB_WI@Z */
1806 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAH_K0PEB_W0@Z */
1807 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_substr_cstr_len, 20)
1808 int __thiscall MSVCP_basic_string_wchar_compare_substr_cstr_len(
1809 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
1810 const wchar_t *str, MSVCP_size_t count)
1814 TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_w(str), count);
1816 if(this->size < pos)
1817 MSVCP__String_base_Xran();
1819 if(pos+num > this->size)
1820 num = this->size-pos;
1822 ans = MSVCP_char_traits_wchar_compare(basic_string_wchar_const_ptr(this)+pos,
1823 str, num>count ? count : num);
1829 else if(num < count)
1834 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEHIIPB_W@Z */
1835 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAH_K0PEB_W@Z */
1836 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_substr_cstr, 16)
1837 int __thiscall MSVCP_basic_string_wchar_compare_substr_cstr(const basic_string_wchar *this,
1838 MSVCP_size_t pos, MSVCP_size_t num, const wchar_t *str)
1840 return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, pos, num,
1841 str, MSVCP_char_traits_wchar_length(str));
1844 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEHPB_W@Z */
1845 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAHPEB_W@Z */
1846 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_cstr, 8)
1847 int __thiscall MSVCP_basic_string_wchar_compare_cstr(
1848 const basic_string_wchar *this, const wchar_t *str)
1850 return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, 0, this->size,
1851 str, MSVCP_char_traits_wchar_length(str));
1854 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEHIIABV12@II@Z */
1855 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAH_K0AEBV12@00@Z */
1856 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_substr_substr, 24)
1857 int __thiscall MSVCP_basic_string_wchar_compare_substr_substr(
1858 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
1859 const basic_string_wchar *compare, MSVCP_size_t off, MSVCP_size_t count)
1861 TRACE("%p %lu %lu %p %lu %lu\n", this, pos, num, compare, off, count);
1863 if(compare->size < off)
1864 MSVCP__String_base_Xran();
1866 if(off+count > compare->size)
1867 count = compare->size-off;
1869 return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, pos, num,
1870 basic_string_wchar_const_ptr(compare)+off, count);
1873 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEHIIABV12@@Z */
1874 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAH_K0AEBV12@@Z */
1875 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_substr, 16)
1876 int __thiscall MSVCP_basic_string_wchar_compare_substr(
1877 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
1878 const basic_string_wchar *compare)
1880 return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, pos, num,
1881 basic_string_wchar_const_ptr(compare), compare->size);
1884 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEHABV12@@Z */
1885 /* ?compare@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAHAEBV12@@Z */
1886 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare, 8)
1887 int __thiscall MSVCP_basic_string_wchar_compare(
1888 const basic_string_wchar *this, const basic_string_wchar *compare)
1890 return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, 0, this->size,
1891 basic_string_wchar_const_ptr(compare), compare->size);
1894 /* ??$?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 */
1895 /* ??$?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 */
1896 MSVCP_bool __cdecl MSVCP_basic_string_wchar_equal(
1897 const basic_string_wchar *left, const basic_string_wchar *right)
1899 return MSVCP_basic_string_wchar_compare(left, right) == 0;
1902 /* ??$?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 */
1903 /* ??$?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 */
1904 MSVCP_bool __cdecl MSVCP_basic_string_wchar_equal_str_cstr(
1905 const basic_string_wchar *left, const wchar_t *right)
1907 return MSVCP_basic_string_wchar_compare_cstr(left, right) == 0;
1910 /* ??$?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 */
1911 /* ??$?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 */
1912 MSVCP_bool __cdecl MSVCP_basic_string_wchar_equal_cstr_str(
1913 const wchar_t *left, const basic_string_wchar *right)
1915 return MSVCP_basic_string_wchar_compare_cstr(right, left) == 0;
1918 /* ??$?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 */
1919 /* ??$?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 */
1920 MSVCP_bool __cdecl MSVCP_basic_string_wchar_not_equal(
1921 const basic_string_wchar *left, const basic_string_wchar *right)
1923 return MSVCP_basic_string_wchar_compare(left, right) != 0;
1926 /* ??$?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 */
1927 /* ??$?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 */
1928 MSVCP_bool __cdecl MSVCP_basic_string_wchar_not_equal_str_cstr(
1929 const basic_string_wchar *left, const wchar_t *right)
1931 return MSVCP_basic_string_wchar_compare_cstr(left, right) != 0;
1934 /* ??$?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 */
1935 /* ??$?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 */
1936 MSVCP_bool __cdecl MSVCP_basic_string_wchar_not_equal_cstr_str(
1937 const wchar_t *left, const basic_string_wchar *right)
1939 return MSVCP_basic_string_wchar_compare_cstr(right, left) != 0;
1942 /* ??$?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 */
1943 /* ??$?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 */
1944 MSVCP_bool __cdecl MSVCP_basic_string_wchar_lower(
1945 const basic_string_wchar *left, const basic_string_wchar *right)
1947 return MSVCP_basic_string_wchar_compare(left, right) < 0;
1950 /* ??$?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 */
1951 /* ??$?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 */
1952 MSVCP_bool __cdecl MSVCP_basic_string_wchar_lower_bstr_cstr(
1953 const basic_string_wchar *left, const wchar_t *right)
1955 return MSVCP_basic_string_wchar_compare_cstr(left, right) < 0;
1958 /* ??$?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 */
1959 /* ??$?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 */
1960 MSVCP_bool __cdecl MSVCP_basic_string_wchar_lower_cstr_bstr(
1961 const wchar_t *left, const basic_string_wchar *right)
1963 return MSVCP_basic_string_wchar_compare_cstr(right, left) > 0;
1966 /* ?find@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WII@Z */
1967 /* ?find@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K1@Z */
1968 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_cstr_substr, 16)
1969 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_cstr_substr(
1970 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos, MSVCP_size_t len)
1972 const wchar_t *p, *end;
1974 TRACE("%p %s %lu %lu\n", this, debugstr_w(find), pos, len);
1976 if(len==0 && pos<=this->size)
1979 end = basic_string_wchar_const_ptr(this)+this->size-len+1;
1980 for(p=basic_string_wchar_const_ptr(this)+pos; p<end; p++) {
1981 p = MSVCP_char_traits_wchar_find(p, end-p, find);
1985 if(!MSVCP_char_traits_wchar_compare(p, find, len))
1986 return p-basic_string_wchar_const_ptr(this);
1989 return MSVCP_basic_string_wchar_npos;
1992 /* ?find@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEI_WI@Z */
1993 /* ?find@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_K_W_K@Z */
1994 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_ch, 12)
1995 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_ch(
1996 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t pos)
1998 return MSVCP_basic_string_wchar_find_cstr_substr(this, &ch, pos, 1);
2001 /* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WII@Z */
2002 /* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K1@Z */
2003 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_of_cstr_substr, 16)
2004 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_of_cstr_substr(
2005 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2007 const wchar_t *p, *end;
2009 TRACE("%p %p %lu %lu\n", this, find, off, len);
2011 if(len>0 && off<this->size) {
2012 end = basic_string_wchar_const_ptr(this)+this->size;
2013 for(p=basic_string_wchar_const_ptr(this)+off; p<end; p++)
2014 if(MSVCP_char_traits_wchar_find(find, len, p))
2015 return p-basic_string_wchar_const_ptr(this);
2018 return MSVCP_basic_string_wchar_npos;
2021 /* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIABV12@I@Z */
2022 /* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KAEBV12@_K@Z */
2023 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_of, 12)
2024 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_of(
2025 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2027 return MSVCP_basic_string_wchar_find_first_of_cstr_substr(this,
2028 basic_string_wchar_const_ptr(find), off, find->size);
2031 /* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WI@Z */
2032 /* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K@Z */
2033 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_of_cstr, 12)
2034 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_of_cstr(
2035 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2037 return MSVCP_basic_string_wchar_find_first_of_cstr_substr(
2038 this, find, off, MSVCP_char_traits_wchar_length(find));
2041 /* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEI_WI@Z */
2042 /* ?find_first_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_K_W_K@Z */
2043 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_of_ch, 12)
2044 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_of_ch(
2045 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2047 return MSVCP_basic_string_wchar_find_first_of_cstr_substr(this, &ch, off, 1);
2050 /* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WII@Z */
2051 /* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K1@Z */
2052 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_of_cstr_substr, 16)
2053 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_of_cstr_substr(
2054 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2056 const wchar_t *p, *beg;
2058 TRACE("%p %p %lu %lu\n", this, find, off, len);
2061 if(len>0 && this->size>0) {
2062 if(off >= this->size)
2065 beg = basic_string_wchar_const_ptr(this);
2066 for(p=beg+off; p>=beg; p--)
2067 if(MSVCP_char_traits_wchar_find(find, len, p))
2071 return MSVCP_basic_string_wchar_npos;
2074 /* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIABV12@I@Z */
2075 /* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KAEBV12@_K@Z */
2076 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_of, 12)
2077 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_of(
2078 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2080 return MSVCP_basic_string_wchar_find_last_of_cstr_substr(this,
2081 basic_string_wchar_const_ptr(find), off, find->size);
2084 /* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEIPB_WI@Z */
2085 /* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_KPEB_W_K@Z */
2086 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_of_cstr, 12)
2087 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_of_cstr(
2088 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2090 return MSVCP_basic_string_wchar_find_last_of_cstr_substr(
2091 this, find, off, MSVCP_char_traits_wchar_length(find));
2094 /* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEI_WI@Z */
2095 /* ?find_last_of@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA_K_W_K@Z */
2096 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_of_ch, 12)
2097 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_of_ch(
2098 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2100 return MSVCP_basic_string_wchar_find_last_of_cstr_substr(this, &ch, off, 1);
2103 /* ?at@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAA_WI@Z */
2104 /* ?at@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEA_W_K@Z */
2105 /* ??A?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAA_WI@Z */
2106 /* ??A?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEA_W_K@Z */
2107 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_at, 8)
2108 wchar_t* __thiscall MSVCP_basic_string_wchar_at(
2109 basic_string_wchar *this, MSVCP_size_t pos)
2111 TRACE("%p %lu\n", this, pos);
2113 if(this->size <= pos)
2114 MSVCP__String_base_Xran();
2116 return basic_string_wchar_ptr(this)+pos;
2119 /* ?at@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEAB_WI@Z */
2120 /* ?at@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAAEB_W_K@Z */
2121 /* ??A?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEAB_WI@Z */
2122 /* ??A?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAAEB_W_K@Z */
2123 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_const_at, 8)
2124 const wchar_t* __thiscall MSVCP_basic_string_wchar_const_at(
2125 const basic_string_wchar *this, MSVCP_size_t pos)
2127 TRACE("%p %lu\n", this, pos);
2129 if(this->size <= pos)
2130 MSVCP__String_base_Xran();
2132 return basic_string_wchar_const_ptr(this)+pos;
2135 /* ?resize@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXI_W@Z */
2136 /* ?resize@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAX_K_W@Z */
2137 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_resize_ch, 12)
2138 void __thiscall MSVCP_basic_string_wchar_resize_ch(
2139 basic_string_wchar *this, MSVCP_size_t size, wchar_t ch)
2141 TRACE("%p %lu %c\n", this, size, ch);
2143 if(size <= this->size)
2144 MSVCP_basic_string_wchar_erase(this, size, this->size);
2146 MSVCP_basic_string_wchar_append_len_ch(this, size-this->size, ch);
2149 /* ?resize@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXI@Z */
2150 /* ?resize@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAX_K@Z */
2151 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_resize, 8)
2152 void __thiscall MSVCP_basic_string_wchar_resize(
2153 basic_string_wchar *this, MSVCP_size_t size)
2155 MSVCP_basic_string_wchar_resize_ch(this, size, '\0');
2158 /* ?clear@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
2159 /* ?clear@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
2160 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_clear, 4)
2161 void __thiscall MSVCP_basic_string_wchar_clear(basic_string_wchar *this)
2163 basic_string_wchar_eos(this, 0);