schedsvc: Avoid an infinite loop.
[wine.git] / dlls / msvcp60 / string.c
blob09f9854b1878e605385eb04d8cac6471b81903bd
1 /*
2 * Copyright 2012 Piotr Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "config.h"
21 #include <stdarg.h>
23 #include "msvcp.h"
24 #include "stdio.h"
26 #include "windef.h"
27 #include "winbase.h"
28 #include "wine/debug.h"
29 WINE_DEFAULT_DEBUG_CHANNEL(msvcp);
31 #define FROZEN 255
33 /* _String_iterator<char> and _String_const_iterator<char> class */
34 typedef struct {
35 char *ptr;
36 } String_reverse_iterator_char;
38 typedef struct {
39 wchar_t *ptr;
40 } String_reverse_iterator_wchar;
42 /* allocator class */
43 typedef struct {
44 char empty_struct;
45 } allocator;
47 /* ?_Xran@std@@YAXXZ */
48 void __cdecl _Xran(void)
50 static const char msg[] = "invalid string position";
52 TRACE("\n");
53 throw_exception(EXCEPTION_OUT_OF_RANGE, msg);
56 /* ?_Xlen@std@@YAXXZ */
57 void __cdecl _Xlen(void)
59 static const char msg[] = "string too long";
61 TRACE("\n");
62 throw_exception(EXCEPTION_LENGTH_ERROR, msg);
65 /* ?compare@?$char_traits@D@std@@SAHPBD0I@Z */
66 /* ?compare@?$char_traits@D@std@@SAHPEBD0_K@Z */
67 int CDECL MSVCP_char_traits_char_compare(
68 const char *s1, const char *s2, MSVCP_size_t count)
70 int ret = memcmp(s1, s2, count);
71 return (ret>0 ? 1 : (ret<0 ? -1 : 0));
74 /* ?length@?$char_traits@D@std@@SAIPBD@Z */
75 /* ?length@?$char_traits@D@std@@SA_KPEBD@Z */
76 MSVCP_size_t CDECL MSVCP_char_traits_char_length(const char *str)
78 return strlen(str);
81 /* ?_Copy_s@?$char_traits@D@std@@SAPADPADIPBDI@Z */
82 /* ?_Copy_s@?$char_traits@D@std@@SAPEADPEAD_KPEBD1@Z */
83 char* CDECL MSVCP_char_traits_char__Copy_s(char *dest,
84 MSVCP_size_t size, const char *src, MSVCP_size_t count)
86 if(!dest || !src || size<count) {
87 if(dest && size)
88 dest[0] = '\0';
89 _invalid_parameter(NULL, NULL, NULL, 0, 0);
90 return dest;
93 return memcpy(dest, src, count);
96 /* ?copy@?$char_traits@D@std@@SAPADPADPBDI@Z */
97 /* ?copy@?$char_traits@D@std@@SAPEADPEADPEBD_K@Z */
98 char* CDECL MSVCP_char_traits_char_copy(
99 char *dest, const char *src, MSVCP_size_t count)
101 return MSVCP_char_traits_char__Copy_s(dest, count, src, count);
104 /* ?find@?$char_traits@D@std@@SAPBDPBDIABD@Z */
105 /* ?find@?$char_traits@D@std@@SAPEBDPEBD_KAEBD@Z */
106 const char * CDECL MSVCP_char_traits_char_find(
107 const char *str, MSVCP_size_t range, const char *c)
109 return memchr(str, *c, range);
112 /* ?_Move_s@?$char_traits@D@std@@SAPADPADIPBDI@Z */
113 /* ?_Move_s@?$char_traits@D@std@@SAPEADPEAD_KPEBD1@Z */
114 char* CDECL MSVCP_char_traits_char__Move_s(char *dest,
115 MSVCP_size_t size, const char *src, MSVCP_size_t count)
117 if(!dest || !src || size<count) {
118 if(dest && size)
119 dest[0] = '\0';
120 _invalid_parameter(NULL, NULL, NULL, 0, 0);
121 return dest;
124 return memmove(dest, src, count);
127 /* ?move@?$char_traits@D@std@@SAPADPADPBDI@Z */
128 /* ?move@?$char_traits@D@std@@SAPEADPEADPEBD_K@Z */
129 char* CDECL MSVCP_char_traits_char_move(
130 char *dest, const char *src, MSVCP_size_t count)
132 return MSVCP_char_traits_char__Move_s(dest, count, src, count);
135 /* ?assign@?$char_traits@D@std@@SAPADPADID@Z */
136 /* ?assign@?$char_traits@D@std@@SAPEADPEAD_KD@Z */
137 char* CDECL MSVCP_char_traits_char_assignn(char *str, MSVCP_size_t num, char c)
139 return memset(str, c, num);
142 /* ?compare@?$char_traits@_W@std@@SAHPB_W0I@Z */
143 /* ?compare@?$char_traits@_W@std@@SAHPEB_W0_K@Z */
144 int CDECL MSVCP_char_traits_wchar_compare(const wchar_t *s1,
145 const wchar_t *s2, MSVCP_size_t count)
147 MSVCP_size_t i;
148 int ret = 0;
150 for (i = 0; i < count && !ret; i++) ret = s1[i] - s2[i];
151 return (ret>0 ? 1 : (ret<0 ? -1 : 0));
154 /* ?length@?$char_traits@_W@std@@SAIPB_W@Z */
155 /* ?length@?$char_traits@_W@std@@SA_KPEB_W@Z */
156 MSVCP_size_t CDECL MSVCP_char_traits_wchar_length(const wchar_t *str)
158 return wcslen((WCHAR*)str);
161 /* ?_Copy_s@?$char_traits@_W@std@@SAPA_WPA_WIPB_WI@Z */
162 /* ?_Copy_s@?$char_traits@_W@std@@SAPEA_WPEA_W_KPEB_W1@Z */
163 wchar_t* CDECL MSVCP_char_traits_wchar__Copy_s(wchar_t *dest,
164 MSVCP_size_t size, const wchar_t *src, MSVCP_size_t count)
166 if(!dest || !src || size<count) {
167 if(dest && size)
168 dest[0] = '\0';
169 _invalid_parameter(NULL, NULL, NULL, 0, 0);
170 return dest;
173 return memcpy(dest, src, count * sizeof(wchar_t));
176 /* ?copy@?$char_traits@_W@std@@SAPA_WPA_WPB_WI@Z */
177 /* ?copy@?$char_traits@_W@std@@SAPEA_WPEA_WPEB_W_K@Z */
178 wchar_t* CDECL MSVCP_char_traits_wchar_copy(wchar_t *dest,
179 const wchar_t *src, MSVCP_size_t count)
181 return MSVCP_char_traits_wchar__Copy_s(dest, count, src, count);
184 /* ?find@?$char_traits@_W@std@@SAPB_WPB_WIAB_W@Z */
185 /* ?find@?$char_traits@_W@std@@SAPEB_WPEB_W_KAEB_W@Z */
186 const wchar_t* CDECL MSVCP_char_traits_wchar_find(
187 const wchar_t *str, MSVCP_size_t range, const wchar_t *c)
189 MSVCP_size_t i=0;
191 for(i=0; i<range; i++)
192 if(str[i] == *c)
193 return str+i;
195 return NULL;
198 /* ?_Move_s@?$char_traits@_W@std@@SAPA_WPA_WIPB_WI@Z */
199 /* ?_Move_s@?$char_traits@_W@std@@SAPEA_WPEA_W_KPEB_W1@Z */
200 wchar_t* CDECL MSVCP_char_traits_wchar__Move_s(wchar_t *dest,
201 MSVCP_size_t size, const wchar_t *src, MSVCP_size_t count)
203 if(!dest || !src || size<count) {
204 if(dest && size)
205 dest[0] = '\0';
206 _invalid_parameter(NULL, NULL, NULL, 0, 0);
207 return dest;
210 return memmove(dest, src, count * sizeof(WCHAR));
213 /* ?move@?$char_traits@_W@std@@SAPA_WPA_WPB_WI@Z */
214 /* ?move@?$char_traits@_W@std@@SAPEA_WPEA_WPEB_W_K@Z */
215 wchar_t* CDECL MSVCP_char_traits_wchar_move(wchar_t *dest,
216 const wchar_t *src, MSVCP_size_t count)
218 return MSVCP_char_traits_wchar__Move_s(dest, count, src, count);
221 /* ?assign@?$char_traits@_W@std@@SAPA_WPA_WI_W@Z */
222 /* ?assign@?$char_traits@_W@std@@SAPEA_WPEA_W_K_W@Z */
223 wchar_t* CDECL MSVCP_char_traits_wchar_assignn(wchar_t *str,
224 MSVCP_size_t num, wchar_t c)
226 MSVCP_size_t i;
228 for(i=0; i<num; i++)
229 str[i] = c;
231 return str;
234 static MSVCP_bool basic_string_char_inside(
235 basic_string_char *this, const char *ptr)
237 return ptr>=this->ptr && ptr<this->ptr+this->size;
240 /* ?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2IB */
241 /* ?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2_KB */
242 const MSVCP_size_t MSVCP_basic_string_char_npos = -1;
244 /* ?_C@?1??_Nullstr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPBDXZ@4DB */
245 /* ?_C@?1??_Nullstr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEBDXZ@4DB */
246 const char basic_string_char_nullbyte = '\0';
248 /* ?_Nullstr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPBDXZ */
249 /* ?_Nullstr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEBDXZ */
250 const char* __cdecl basic_string_char__Nullstr(void)
252 return &basic_string_char_nullbyte;
255 /* ?_Refcnt@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEAAEPBD@Z */
256 /* ?_Refcnt@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAAEAEPEBD@Z */
257 DEFINE_THISCALL_WRAPPER(basic_string_char__Refcnt, 8)
258 unsigned char* __thiscall basic_string_char__Refcnt(basic_string_char *this, const char *ptr)
260 TRACE("(%p %p)\n", this, ptr);
261 return (unsigned char*)ptr-1;
264 /* ?_Eos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXI@Z */
265 /* ?_Eos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAX_K@Z */
266 DEFINE_THISCALL_WRAPPER(basic_string_char__Eos, 8)
267 void __thiscall basic_string_char__Eos(basic_string_char *this, MSVCP_size_t len)
269 this->size = len;
270 this->ptr[len] = 0;
273 /* ?clear@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
274 /* ?clear@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
275 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_clear, 4)
276 void __thiscall MSVCP_basic_string_char_clear(basic_string_char *this)
278 if(this->ptr)
279 basic_string_char__Eos(this, 0);
282 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEX_N@Z */
283 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAX_N@Z */
284 DEFINE_THISCALL_WRAPPER(basic_string_char__Tidy, 8)
285 void __thiscall basic_string_char__Tidy(basic_string_char *this, MSVCP_bool built)
287 TRACE("(%p %d)\n", this, built);
289 if(!built || !this->ptr);
290 else if(!this->ptr[-1] || (unsigned char)this->ptr[-1]==FROZEN)
291 MSVCP_allocator_char_deallocate(NULL, this->ptr-1, this->res+2);
292 else
293 this->ptr[-1]--;
295 memset(this, 0, sizeof(*this));
298 /* ?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAE_NI_N@Z */
299 /* ?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAA_N_K_N@Z */
300 DEFINE_THISCALL_WRAPPER(basic_string_char__Grow, 12)
301 MSVCP_bool __thiscall basic_string_char__Grow(basic_string_char *this, MSVCP_size_t new_size, MSVCP_bool trim)
303 if(!new_size) {
304 if(trim)
305 basic_string_char__Tidy(this, TRUE);
306 else if(this->ptr)
307 basic_string_char__Eos(this, 0);
308 } else if(this->res<new_size || trim ||
309 (this->ptr && this->ptr[-1] && (unsigned char)this->ptr[-1]!=FROZEN)) {
310 MSVCP_size_t new_res = new_size, len = this->size;
311 char *ptr;
313 if(!trim && this->ptr && !this->ptr[-1]) {
314 new_res |= 0xf;
315 if(new_res/3 < this->res/2)
316 new_res = this->res + this->res/2;
319 ptr = MSVCP_allocator_char_allocate(this->allocator, new_res+2);
320 if(!ptr) {
321 new_res = new_size;
322 ptr = MSVCP_allocator_char_allocate(this->allocator, new_size+2);
324 if(!ptr) {
325 ERR("Out of memory\n");
326 return FALSE;
329 if(len > new_res)
330 len = new_res;
332 *ptr = 0;
333 if(this->ptr)
334 MSVCP_char_traits_char__Copy_s(ptr+1, new_size, this->ptr, len);
335 basic_string_char__Tidy(this, TRUE);
336 this->ptr = ptr+1;
337 this->res = new_res;
338 basic_string_char__Eos(this, len);
341 return new_size>0;
344 /* ?_Split@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXXZ */
345 /* ?_Split@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAXXZ */
346 DEFINE_THISCALL_WRAPPER(basic_string_char__Split, 4)
347 void __thiscall basic_string_char__Split(basic_string_char *this)
349 MSVCP_size_t len;
350 char *ptr;
352 TRACE("(%p)\n", this);
354 if(!this->ptr || !this->ptr[-1] || (unsigned char)this->ptr[-1]==FROZEN)
355 return;
357 ptr = this->ptr;
358 len = this->size;
359 basic_string_char__Tidy(this, TRUE);
360 if(basic_string_char__Grow(this, len, FALSE)) {
361 if(ptr)
362 MSVCP_char_traits_char__Copy_s(this->ptr, this->res, ptr, len);
363 basic_string_char__Eos(this, len);
367 /* ?_Freeze@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXXZ */
368 /* ?_Freeze@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAXXZ */
369 DEFINE_THISCALL_WRAPPER(basic_string_char__Freeze, 4)
370 void __thiscall basic_string_char__Freeze(basic_string_char *this)
372 TRACE("(%p)\n", this);
373 basic_string_char__Split(this);
374 if(this->ptr)
375 this->ptr[-1] = FROZEN;
378 /* ?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXI@Z */
379 /* ?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAX_K@Z */
380 DEFINE_THISCALL_WRAPPER(basic_string_char__Copy, 8)
381 void __thiscall basic_string_char__Copy(basic_string_char *this, MSVCP_size_t copy_len)
383 TRACE("%p %lu\n", this, copy_len);
385 if(!basic_string_char__Grow(this, copy_len, TRUE))
386 return;
389 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPADPADI@Z */
390 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEADPEAD_K@Z */
391 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPBDPBDI@Z */
392 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEBDPEBD_K@Z */
393 char* __cdecl basic_string_char__Psum(char *iter, MSVCP_size_t add)
395 TRACE("(%p %lu)\n", iter, add);
396 return iter ? iter+add : iter;
399 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z */
400 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0@Z */
401 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_erase, 12)
402 basic_string_char* __thiscall MSVCP_basic_string_char_erase(
403 basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t len)
405 TRACE("%p %lu %lu\n", this, pos, len);
407 if(pos > this->size)
408 _Xran();
410 if(len > this->size-pos)
411 len = this->size-pos;
413 if(len) {
414 basic_string_char__Split(this);
415 MSVCP_char_traits_char__Move_s(this->ptr+pos, this->res-pos,
416 this->ptr+pos+len, this->size-pos-len);
417 basic_string_char__Eos(this, this->size-len);
420 return this;
423 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPAD@Z */
424 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEAD@Z */
425 DEFINE_THISCALL_WRAPPER(basic_string_char_erase_beg, 8)
426 char* __thiscall basic_string_char_erase_beg(basic_string_char *this, char *beg)
428 MSVCP_size_t pos = beg-this->ptr;
429 MSVCP_basic_string_char_erase(this, pos, 1);
430 return this->ptr+pos;
433 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */
434 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
435 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_substr, 16)
436 basic_string_char* __thiscall MSVCP_basic_string_char_assign_substr(
437 basic_string_char *this, const basic_string_char *assign,
438 MSVCP_size_t pos, MSVCP_size_t len)
440 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
442 if(assign->size < pos)
443 _Xran();
445 if(len > assign->size-pos)
446 len = assign->size-pos;
448 if(this == assign) {
449 MSVCP_basic_string_char_erase(this, pos+len, MSVCP_basic_string_char_npos);
450 MSVCP_basic_string_char_erase(this, 0, pos);
451 } else if(basic_string_char__Grow(this, len, FALSE)) {
452 if(assign->ptr)
453 MSVCP_char_traits_char__Copy_s(this->ptr, this->res, assign->ptr+pos, len);
454 basic_string_char__Eos(this, len);
457 return this;
460 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z */
461 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z */
462 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_cstr_len, 12)
463 basic_string_char* __thiscall MSVCP_basic_string_char_assign_cstr_len(
464 basic_string_char *this, const char *str, MSVCP_size_t len)
466 TRACE("%p %s %lu\n", this, debugstr_an(str, len), len);
468 if(basic_string_char_inside(this, str))
469 return MSVCP_basic_string_char_assign_substr(this, this, str-this->ptr, len);
470 else if(basic_string_char__Grow(this, len, FALSE)) {
471 MSVCP_char_traits_char__Copy_s(this->ptr, this->res, str, len);
472 basic_string_char__Eos(this, len);
475 return this;
478 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */
479 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */
480 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z */
481 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@AEBV01@@Z */
482 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign, 8)
483 basic_string_char* __thiscall MSVCP_basic_string_char_assign(
484 basic_string_char *this, const basic_string_char *assign)
486 return MSVCP_basic_string_char_assign_substr(this, assign,
487 0, MSVCP_basic_string_char_npos);
490 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z */
491 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD@Z */
492 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z */
493 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@PEBD@Z */
494 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_cstr, 8)
495 basic_string_char* __thiscall MSVCP_basic_string_char_assign_cstr(
496 basic_string_char *this, const char *str)
498 return MSVCP_basic_string_char_assign_cstr_len(this, str,
499 MSVCP_char_traits_char_length(str));
502 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@D@Z */
503 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@D@Z */
504 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_ch, 8)
505 basic_string_char* __thiscall MSVCP_basic_string_char_assign_ch(
506 basic_string_char *this, char ch)
508 return MSVCP_basic_string_char_assign_cstr_len(this, &ch, 1);
511 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */
512 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KD@Z */
513 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assignn, 12)
514 basic_string_char* __thiscall MSVCP_basic_string_char_assignn(
515 basic_string_char *this, MSVCP_size_t count, char ch)
517 TRACE("%p %ld %c\n", this, count, ch);
519 basic_string_char__Grow(this, count, FALSE);
520 MSVCP_char_traits_char_assignn(this->ptr, count, ch);
521 basic_string_char__Eos(this, count);
522 return this;
525 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD0@Z */
526 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD0@Z */
527 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_ptr_ptr, 12)
528 basic_string_char* __thiscall MSVCP_basic_string_char_assign_ptr_ptr(
529 basic_string_char *this, const char *first, const char *last)
531 return MSVCP_basic_string_char_assign_cstr_len(this, first, last-first);
534 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDIABV?$allocator@D@1@@Z */
535 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD_KAEBV?$allocator@D@1@@Z */
536 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_cstr_len_alloc, 16)
537 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_len_alloc(
538 basic_string_char *this, const char *str, MSVCP_size_t len, const void *alloc)
540 TRACE("%p %s %ld\n", this, debugstr_an(str, len), len);
542 basic_string_char__Tidy(this, FALSE);
543 MSVCP_basic_string_char_assign_cstr_len(this, str, len);
544 return this;
547 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDI@Z */
548 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD_K@Z */
549 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_cstr_len, 12)
550 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_len(
551 basic_string_char *this, const char *str, MSVCP_size_t len)
553 return MSVCP_basic_string_char_ctor_cstr_len_alloc(this, str, len, NULL);
556 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@IIABV?$allocator@D@1@@Z */
557 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@_K1AEBV?$allocator@D@1@@Z */
558 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_substr_alloc, 20)
559 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_substr_alloc(
560 basic_string_char *this, const basic_string_char *assign,
561 MSVCP_size_t pos, MSVCP_size_t len, const void *alloc)
563 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
565 basic_string_char__Tidy(this, FALSE);
566 MSVCP_basic_string_char_assign_substr(this, assign, pos, len);
567 return this;
570 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDABV?$allocator@D@1@@Z */
571 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBDAEBV?$allocator@D@1@@Z */
572 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_cstr_alloc, 12)
573 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_alloc(
574 basic_string_char *this, const char *str, const void *alloc)
576 TRACE("%p %s\n", this, debugstr_a(str));
578 basic_string_char__Tidy(this, FALSE);
579 MSVCP_basic_string_char_assign_cstr(this, str);
580 return this;
583 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z */
584 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD@Z */
585 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_cstr, 8)
586 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr(
587 basic_string_char *this, const char *str)
589 return MSVCP_basic_string_char_ctor_cstr_alloc(this, str, NULL);
592 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@IDABV?$allocator@D@1@@Z */
593 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@_KDAEBV?$allocator@D@1@@Z */
594 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_ch_alloc, 16)
595 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_ch_alloc(basic_string_char *this,
596 MSVCP_size_t count, char ch, const void *alloc)
598 TRACE("%p %ld %c\n", this, count, ch);
600 basic_string_char__Tidy(this, FALSE);
601 MSVCP_basic_string_char_assignn(this, count, ch);
602 return this;
605 /* ??_F?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
606 /* ??_F?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
607 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor, 4)
608 basic_string_char* __thiscall MSVCP_basic_string_char_ctor(basic_string_char *this)
610 TRACE("%p\n", this);
612 basic_string_char__Tidy(this, FALSE);
613 return this;
616 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$allocator@D@1@@Z */
617 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV?$allocator@D@1@@Z */
618 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_alloc, 8)
619 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_alloc(
620 basic_string_char *this, const void *alloc)
622 TRACE("%p %p\n", this, alloc);
624 basic_string_char__Tidy(this, FALSE);
625 return this;
628 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z */
629 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@@Z */
630 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_copy_ctor, 8)
631 basic_string_char* __thiscall MSVCP_basic_string_char_copy_ctor(
632 basic_string_char *this, const basic_string_char *copy)
634 TRACE("%p %p\n", this, copy);
636 basic_string_char__Tidy(this, FALSE);
637 MSVCP_basic_string_char_assign(this, copy);
638 return this;
641 /* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ */
642 /* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@XZ */
643 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_dtor, 4)
644 void __thiscall MSVCP_basic_string_char_dtor(basic_string_char *this)
646 TRACE("%p\n", this);
647 basic_string_char__Tidy(this, TRUE);
650 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIPBDI@Z */
651 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0PEBD0@Z */
652 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_substr_cstr_len, 20)
653 int __thiscall MSVCP_basic_string_char_compare_substr_cstr_len(
654 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
655 const char *str, MSVCP_size_t count)
657 int ans;
659 TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_an(str, count), count);
661 if(this->size < pos)
662 _Xran();
664 if(num > this->size-pos)
665 num = this->size-pos;
667 ans = MSVCP_char_traits_char_compare(this->ptr+pos,
668 str, num>count ? count : num);
669 if(ans)
670 return ans;
672 if(num > count)
673 ans = 1;
674 else if(num < count)
675 ans = -1;
676 return ans;
679 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHPBD@Z */
680 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAHPEBD@Z */
681 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_cstr, 8)
682 int __thiscall MSVCP_basic_string_char_compare_cstr(
683 const basic_string_char *this, const char *str)
685 return MSVCP_basic_string_char_compare_substr_cstr_len(this, 0, this->size,
686 str, MSVCP_char_traits_char_length(str));
689 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIABV12@II@Z */
690 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0AEBV12@00@Z */
691 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_substr_substr, 24)
692 int __thiscall MSVCP_basic_string_char_compare_substr_substr(
693 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
694 const basic_string_char *compare, MSVCP_size_t off, MSVCP_size_t count)
696 TRACE("%p %lu %lu %p %lu %lu\n", this, pos, num, compare, off, count);
698 if(compare->size < off)
699 _Xran();
701 if(count > compare->size-off)
702 count = compare->size-off;
704 return MSVCP_basic_string_char_compare_substr_cstr_len(this, pos, num,
705 compare->ptr+off, count);
708 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIABV12@@Z */
709 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0AEBV12@@Z */
710 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_substr, 16)
711 int __thiscall MSVCP_basic_string_char_compare_substr(
712 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
713 const basic_string_char *compare)
715 return MSVCP_basic_string_char_compare_substr_cstr_len(this, pos, num,
716 compare->ptr, compare->size);
719 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHABV12@@Z */
720 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAHAEBV12@@Z */
721 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare, 8)
722 int __thiscall MSVCP_basic_string_char_compare(
723 const basic_string_char *this, const basic_string_char *compare)
725 return MSVCP_basic_string_char_compare_substr_cstr_len(this, 0, this->size,
726 compare->ptr, compare->size);
729 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIPBD@Z */
730 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0PEBD@Z */
731 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_compare_substr_cstr, 16)
732 int __thiscall MSVCP_basic_string_char_compare_substr_cstr(const basic_string_char *this,
733 MSVCP_size_t pos, MSVCP_size_t num, const char *str)
735 return MSVCP_basic_string_char_compare_substr_cstr_len(this, pos, num,
736 str, MSVCP_char_traits_char_length(str));
739 /* ??$?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 */
740 /* ??$?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 */
741 /* ??8std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
742 /* ??8std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
743 MSVCP_bool __cdecl MSVCP_basic_string_char_equal(
744 const basic_string_char *left, const basic_string_char *right)
746 return MSVCP_basic_string_char_compare(left, right) == 0;
749 /* ??$?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 */
750 /* ??$?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 */
751 /* ??8std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
752 /* ??8std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
753 MSVCP_bool __cdecl MSVCP_basic_string_char_equal_str_cstr(
754 const basic_string_char *left, const char *right)
756 return MSVCP_basic_string_char_compare_cstr(left, right) == 0;
759 /* ??$?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 */
760 /* ??$?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 */
761 /* ??8std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
762 /* ??8std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
763 MSVCP_bool __cdecl MSVCP_basic_string_char_equal_cstr_str(
764 const char *left, const basic_string_char *right)
766 return MSVCP_basic_string_char_compare_cstr(right, left) == 0;
769 /* ??$?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 */
770 /* ??$?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 */
771 /* ??9std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
772 /* ??9std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
773 MSVCP_bool __cdecl MSVCP_basic_string_char_not_equal(
774 const basic_string_char *left, const basic_string_char *right)
776 return MSVCP_basic_string_char_compare(left, right) != 0;
779 /* ??$?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 */
780 /* ??$?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 */
781 /* ??9std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
782 /* ??9std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
783 MSVCP_bool __cdecl MSVCP_basic_string_char_not_equal_str_cstr(
784 const basic_string_char *left, const char *right)
786 return MSVCP_basic_string_char_compare_cstr(left, right) != 0;
789 /* ??$?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 */
790 /* ??$?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 */
791 /* ??9std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
792 /* ??9std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
793 MSVCP_bool __cdecl MSVCP_basic_string_char_not_equal_cstr_str(
794 const char *left, const basic_string_char *right)
796 return MSVCP_basic_string_char_compare_cstr(right, left) != 0;
799 /* ??$?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 */
800 /* ??$?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 */
801 /* ??Mstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
802 /* ??Mstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
803 MSVCP_bool __cdecl MSVCP_basic_string_char_lower(
804 const basic_string_char *left, const basic_string_char *right)
806 return MSVCP_basic_string_char_compare(left, right) < 0;
809 /* ??$?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 */
810 /* ??$?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 */
811 /* ??Mstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
812 /* ??Mstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
813 MSVCP_bool __cdecl MSVCP_basic_string_char_lower_bstr_cstr(
814 const basic_string_char *left, const char *right)
816 return MSVCP_basic_string_char_compare_cstr(left, right) < 0;
819 /* ??$?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 */
820 /* ??$?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 */
821 /* ??Mstd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
822 /* ??Mstd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
823 MSVCP_bool __cdecl MSVCP_basic_string_char_lower_cstr_bstr(
824 const char *left, const basic_string_char *right)
826 return MSVCP_basic_string_char_compare_cstr(right, left) > 0;
829 /* ??$?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 */
830 /* ??$?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 */
831 /* ??Nstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
832 /* ??Nstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
833 MSVCP_bool __cdecl MSVCP_basic_string_char_leq(
834 const basic_string_char *left, const basic_string_char *right)
836 return MSVCP_basic_string_char_compare(left, right) <= 0;
839 /* ??$?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 */
840 /* ??$?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 */
841 /* ??Nstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
842 /* ??Nstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
843 MSVCP_bool __cdecl MSVCP_basic_string_char_leq_bstr_cstr(
844 const basic_string_char *left, const char *right)
846 return MSVCP_basic_string_char_compare_cstr(left, right) <= 0;
849 /* ??$?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 */
850 /* ??$?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 */
851 /* ??Nstd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
852 /* ??Nstd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
853 MSVCP_bool __cdecl MSVCP_basic_string_char_leq_cstr_bstr(
854 const char *left, const basic_string_char *right)
856 return MSVCP_basic_string_char_compare_cstr(right, left) >= 0;
859 /* ??$?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 */
860 /* ??$?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 */
861 /* ??Ostd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
862 /* ??Ostd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
863 MSVCP_bool __cdecl MSVCP_basic_string_char_greater(
864 const basic_string_char *left, const basic_string_char *right)
866 return MSVCP_basic_string_char_compare(left, right) > 0;
869 /* ??$?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 */
870 /* ??$?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 */
871 /* ??Ostd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
872 /* ??Ostd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
873 MSVCP_bool __cdecl MSVCP_basic_string_char_greater_bstr_cstr(
874 const basic_string_char *left, const char *right)
876 return MSVCP_basic_string_char_compare_cstr(left, right) > 0;
879 /* ??$?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 */
880 /* ??$?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 */
881 /* ??Ostd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
882 /* ??Ostd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
883 MSVCP_bool __cdecl MSVCP_basic_string_char_greater_cstr_bstr(
884 const char *left, const basic_string_char *right)
886 return MSVCP_basic_string_char_compare_cstr(right, left) < 0;
889 /* ??$?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 */
890 /* ??$?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 */
891 /* ??Pstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
892 /* ??Pstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
893 MSVCP_bool __cdecl MSVCP_basic_string_char_geq(
894 const basic_string_char *left, const basic_string_char *right)
896 return MSVCP_basic_string_char_compare(left, right) >= 0;
899 /* ??$?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 */
900 /* ??$?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 */
901 /* ??Pstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
902 /* ??Pstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
903 MSVCP_bool __cdecl MSVCP_basic_string_char_geq_bstr_cstr(
904 const basic_string_char *left, const char *right)
906 return MSVCP_basic_string_char_compare_cstr(left, right) >= 0;
909 /* ??$?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 */
910 /* ??$?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 */
911 /* ??Pstd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
912 /* ??Pstd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
913 MSVCP_bool __cdecl MSVCP_basic_string_char_geq_cstr_bstr(
914 const char *left, const basic_string_char *right)
916 return MSVCP_basic_string_char_compare_cstr(right, left) <= 0;
919 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
920 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
921 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_cstr_substr, 16)
922 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_cstr_substr(
923 const basic_string_char *this, const char *find, MSVCP_size_t pos, MSVCP_size_t len)
925 const char *p, *end;
927 TRACE("%p %s %lu %lu\n", this, debugstr_an(find, len), pos, len);
929 if(len==0 && pos<=this->size)
930 return pos;
931 if(pos>=this->size || len>this->size)
932 return MSVCP_basic_string_char_npos;
934 end = this->ptr+this->size-len+1;
935 for(p=this->ptr+pos; p<end; p++) {
936 p = MSVCP_char_traits_char_find(p, end-p, find);
937 if(!p)
938 break;
940 if(!MSVCP_char_traits_char_compare(p, find, len))
941 return p-this->ptr;
944 return MSVCP_basic_string_char_npos;
947 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
948 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
949 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_off, 12)
950 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_off(
951 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
953 return MSVCP_basic_string_char_find_cstr_substr(this, find->ptr, off, find->size);
956 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
957 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
958 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_ch, 12)
959 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_ch(
960 const basic_string_char *this, char ch, MSVCP_size_t pos)
962 return MSVCP_basic_string_char_find_cstr_substr(this, &ch, pos, 1);
965 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
966 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
967 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_cstr_off, 12)
968 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_cstr_off(
969 const basic_string_char *this, const char *find, MSVCP_size_t pos)
971 return MSVCP_basic_string_char_find_cstr_substr(this, find, pos,
972 MSVCP_char_traits_char_length(find));
975 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
976 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
977 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_rfind_cstr_substr, 16)
978 MSVCP_size_t __thiscall MSVCP_basic_string_char_rfind_cstr_substr(
979 const basic_string_char *this, const char *find, MSVCP_size_t pos, MSVCP_size_t len)
981 const char *p, *end;
983 TRACE("%p %s %lu %lu\n", this, debugstr_an(find, len), pos, len);
985 if(len==0)
986 return pos<this->size ? pos : this->size;
988 if(len > this->size)
989 return MSVCP_basic_string_char_npos;
991 if(pos > this->size-len)
992 pos = this->size-len;
993 end = this->ptr;
994 for(p=end+pos; p>=end; p--) {
995 if(*p==*find && !MSVCP_char_traits_char_compare(p, find, len))
996 return p-this->ptr;
999 return MSVCP_basic_string_char_npos;
1002 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1003 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1004 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_rfind_off, 12)
1005 MSVCP_size_t __thiscall MSVCP_basic_string_char_rfind_off(
1006 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1008 return MSVCP_basic_string_char_rfind_cstr_substr(this, find->ptr, off, find->size);
1011 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1012 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1013 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_rfind_ch, 12)
1014 MSVCP_size_t __thiscall MSVCP_basic_string_char_rfind_ch(
1015 const basic_string_char *this, char ch, MSVCP_size_t pos)
1017 return MSVCP_basic_string_char_rfind_cstr_substr(this, &ch, pos, 1);
1020 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1021 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1022 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_rfind_cstr_off, 12)
1023 MSVCP_size_t __thiscall MSVCP_basic_string_char_rfind_cstr_off(
1024 const basic_string_char *this, const char *find, MSVCP_size_t pos)
1026 return MSVCP_basic_string_char_rfind_cstr_substr(this, find, pos,
1027 MSVCP_char_traits_char_length(find));
1030 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1031 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1032 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_not_of_cstr_substr, 16)
1033 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_not_of_cstr_substr(
1034 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
1036 const char *p, *end;
1038 TRACE("%p %p %lu %lu\n", this, find, off, len);
1040 if(off<this->size) {
1041 end = this->ptr+this->size;
1042 for(p=this->ptr+off; p<end; p++)
1043 if(!MSVCP_char_traits_char_find(find, len, p))
1044 return p-this->ptr;
1047 return MSVCP_basic_string_char_npos;
1050 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1051 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1052 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_not_of, 12)
1053 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_not_of(
1054 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1056 return MSVCP_basic_string_char_find_first_not_of_cstr_substr(this,
1057 find->ptr, off, find->size);
1060 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1061 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1062 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_not_of_ch, 12)
1063 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_not_of_ch(
1064 const basic_string_char *this, char ch, MSVCP_size_t off)
1066 return MSVCP_basic_string_char_find_first_not_of_cstr_substr(this, &ch, off, 1);
1069 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1070 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1071 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_not_of_cstr, 12)
1072 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_not_of_cstr(
1073 const basic_string_char *this, const char *find, MSVCP_size_t off)
1075 return MSVCP_basic_string_char_find_first_not_of_cstr_substr(
1076 this, find, off, MSVCP_char_traits_char_length(find));
1079 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1080 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1081 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_of_cstr_substr, 16)
1082 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_of_cstr_substr(
1083 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
1085 const char *p, *end;
1087 TRACE("%p %p %lu %lu\n", this, find, off, len);
1089 if(len>0 && off<this->size) {
1090 end = this->ptr+this->size;
1091 for(p=this->ptr+off; p<end; p++)
1092 if(MSVCP_char_traits_char_find(find, len, p))
1093 return p-this->ptr;
1096 return MSVCP_basic_string_char_npos;
1099 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1100 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1101 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_of, 12)
1102 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_of(
1103 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1105 return MSVCP_basic_string_char_find_first_of_cstr_substr(this,
1106 find->ptr, off, find->size);
1109 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1110 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1111 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_of_ch, 12)
1112 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_of_ch(
1113 const basic_string_char *this, char ch, MSVCP_size_t off)
1115 return MSVCP_basic_string_char_find_first_of_cstr_substr(this, &ch, off, 1);
1118 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1119 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1120 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_first_of_cstr, 12)
1121 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_first_of_cstr(
1122 const basic_string_char *this, const char *find, MSVCP_size_t off)
1124 return MSVCP_basic_string_char_find_first_of_cstr_substr(
1125 this, find, off, MSVCP_char_traits_char_length(find));
1128 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1129 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1130 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_not_of_cstr_substr, 16)
1131 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_not_of_cstr_substr(
1132 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
1134 const char *p, *beg;
1136 TRACE("%p %p %lu %lu\n", this, find, off, len);
1138 if(len>0 && this->size>0) {
1139 if(off >= this->size)
1140 off = this->size-1;
1142 beg = this->ptr;
1143 for(p=beg+off; p>=beg; p--)
1144 if(!MSVCP_char_traits_char_find(find, len, p))
1145 return p-beg;
1148 return MSVCP_basic_string_char_npos;
1151 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1152 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1153 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_not_of, 12)
1154 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_not_of(
1155 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1157 return MSVCP_basic_string_char_find_last_not_of_cstr_substr(this,
1158 find->ptr, off, find->size);
1161 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1162 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1163 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_not_of_ch, 12)
1164 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_not_of_ch(
1165 const basic_string_char *this, char ch, MSVCP_size_t off)
1167 return MSVCP_basic_string_char_find_last_not_of_cstr_substr(this, &ch, off, 1);
1170 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1171 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1172 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_not_of_cstr, 12)
1173 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_not_of_cstr(
1174 const basic_string_char *this, const char *find, MSVCP_size_t off)
1176 return MSVCP_basic_string_char_find_last_not_of_cstr_substr(
1177 this, find, off, MSVCP_char_traits_char_length(find));
1180 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1181 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1182 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_of_cstr_substr, 16)
1183 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_of_cstr_substr(
1184 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
1186 const char *p, *beg;
1188 TRACE("%p %p %lu %lu\n", this, find, off, len);
1190 if(len>0 && this->size>0) {
1191 if(off >= this->size)
1192 off = this->size-1;
1194 beg = this->ptr;
1195 for(p=beg+off; p>=beg; p--)
1196 if(MSVCP_char_traits_char_find(find, len, p))
1197 return p-beg;
1200 return MSVCP_basic_string_char_npos;
1203 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1204 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1205 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_of, 12)
1206 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_of(
1207 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1209 return MSVCP_basic_string_char_find_last_of_cstr_substr(this,
1210 find->ptr, off, find->size);
1213 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1214 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1215 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_of_ch, 12)
1216 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_of_ch(
1217 const basic_string_char *this, char ch, MSVCP_size_t off)
1219 return MSVCP_basic_string_char_find_last_of_cstr_substr(this, &ch, off, 1);
1222 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1223 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1224 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_find_last_of_cstr, 12)
1225 MSVCP_size_t __thiscall MSVCP_basic_string_char_find_last_of_cstr(
1226 const basic_string_char *this, const char *find, MSVCP_size_t off)
1228 return MSVCP_basic_string_char_find_last_of_cstr_substr(
1229 this, find, off, MSVCP_char_traits_char_length(find));
1232 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */
1233 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
1234 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_substr, 16)
1235 basic_string_char* __thiscall MSVCP_basic_string_char_append_substr(basic_string_char *this,
1236 const basic_string_char *append, MSVCP_size_t offset, MSVCP_size_t count)
1238 TRACE("%p %p %lu %lu\n", this, append, offset, count);
1240 if(append->size < offset)
1241 _Xran();
1243 if(count > append->size-offset)
1244 count = append->size-offset;
1246 if(MSVCP_basic_string_char_npos-this->size<=count || this->size+count<this->size)
1247 _Xlen();
1249 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1250 if(append->ptr)
1251 MSVCP_char_traits_char__Copy_s(this->ptr+this->size, this->res-this->size,
1252 append->ptr+offset, count);
1253 basic_string_char__Eos(this, this->size+count);
1256 return this;
1259 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z */
1260 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z */
1261 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_cstr_len, 12)
1262 basic_string_char* __thiscall MSVCP_basic_string_char_append_cstr_len(
1263 basic_string_char *this, const char *append, MSVCP_size_t count)
1265 TRACE("%p %s %lu\n", this, debugstr_an(append, count), count);
1267 if(basic_string_char_inside(this, append))
1268 return MSVCP_basic_string_char_append_substr(this, this, append-this->ptr, count);
1270 if(MSVCP_basic_string_char_npos-this->size<=count || this->size+count<this->size)
1271 _Xlen();
1273 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1274 MSVCP_char_traits_char__Copy_s(this->ptr+this->size,
1275 this->res-this->size, append, count);
1276 basic_string_char__Eos(this, this->size+count);
1279 return this;
1282 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */
1283 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KD@Z */
1284 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_len_ch, 12)
1285 basic_string_char* __thiscall MSVCP_basic_string_char_append_len_ch(
1286 basic_string_char *this, MSVCP_size_t count, char ch)
1288 TRACE("%p %lu %c\n", this, count, ch);
1290 if(MSVCP_basic_string_char_npos-this->size <= count)
1291 _Xlen();
1293 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1294 MSVCP_char_traits_char_assignn(this->ptr+this->size, count, ch);
1295 basic_string_char__Eos(this, this->size+count);
1298 return this;
1301 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */
1302 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */
1303 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z */
1304 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@AEBV01@@Z */
1305 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append, 8)
1306 basic_string_char* __thiscall MSVCP_basic_string_char_append(
1307 basic_string_char *this, const basic_string_char *append)
1309 return MSVCP_basic_string_char_append_substr(this, append,
1310 0, MSVCP_basic_string_char_npos);
1313 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@D@Z */
1314 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@D@Z */
1315 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_ch, 8)
1316 basic_string_char* __thiscall MSVCP_basic_string_char_append_ch(
1317 basic_string_char *this, char ch)
1319 return MSVCP_basic_string_char_append_len_ch(this, 1, ch);
1322 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD0@Z */
1323 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD0@Z */
1324 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_beg_end, 12)
1325 basic_string_char* __thiscall MSVCP_basic_string_char_append_beg_end(
1326 basic_string_char *this, const char *beg, const char *end)
1328 return MSVCP_basic_string_char_append_cstr_len(this, beg, end-beg);
1331 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z */
1332 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD@Z */
1333 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z */
1334 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@PEBD@Z */
1335 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_cstr, 8)
1336 basic_string_char* __thiscall MSVCP_basic_string_char_append_cstr(
1337 basic_string_char *this, const char *append)
1339 return MSVCP_basic_string_char_append_cstr_len(this, append,
1340 MSVCP_char_traits_char_length(append));
1342 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z */
1343 /* ??$?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 */
1344 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z */
1345 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@0@Z */
1346 basic_string_char* __cdecl MSVCP_basic_string_char_concatenate(basic_string_char *ret,
1347 const basic_string_char *left, const basic_string_char *right)
1349 TRACE("%p %p\n", left, right);
1351 MSVCP_basic_string_char_copy_ctor(ret, left);
1352 MSVCP_basic_string_char_append(ret, right);
1353 return ret;
1356 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@D@Z */
1357 /* ??$?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 */
1358 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@D@Z */
1359 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@D@Z */
1360 basic_string_char* __cdecl MSVCP_basic_string_char_concatenate_bstr_ch(basic_string_char *ret,
1361 const basic_string_char *left, char right)
1363 TRACE("%p %c\n", left, right);
1365 MSVCP_basic_string_char_copy_ctor(ret, left);
1366 MSVCP_basic_string_char_append_ch(ret, right);
1367 return ret;
1370 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z */
1371 /* ??$?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 */
1372 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z */
1373 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@PEBD@Z */
1374 basic_string_char* __cdecl MSVCP_basic_string_char_concatenate_bstr_cstr(basic_string_char *ret,
1375 const basic_string_char *left, const char *right)
1377 TRACE("%p %s\n", left, debugstr_a(right));
1379 MSVCP_basic_string_char_copy_ctor(ret, left);
1380 MSVCP_basic_string_char_append_cstr(ret, right);
1381 return ret;
1384 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DABV10@@Z */
1385 /* ??$?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 */
1386 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DABV10@@Z */
1387 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DAEBV10@@Z */
1388 basic_string_char* __cdecl MSVCP_basic_string_char_concatenate_ch_bstr(basic_string_char *ret,
1389 char left, const basic_string_char *right)
1391 TRACE("%c %p\n", left, right);
1393 MSVCP_basic_string_char_ctor_cstr_len_alloc(ret, &left, 1, NULL);
1394 MSVCP_basic_string_char_append(ret, right);
1395 return ret;
1398 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z */
1399 /* ??$?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 */
1400 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z */
1401 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBDAEBV10@@Z */
1402 basic_string_char* __cdecl MSVCP_basic_string_char_concatenate_cstr_bstr(basic_string_char *ret,
1403 const char *left, const basic_string_char *right)
1405 TRACE("%s %p\n", debugstr_a(left), right);
1407 MSVCP_basic_string_char_ctor_cstr_alloc(ret, left, NULL);
1408 MSVCP_basic_string_char_append(ret, right);
1409 return ret;
1412 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */
1413 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */
1414 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_operator_at, 8)
1415 char* __thiscall MSVCP_basic_string_char_operator_at(
1416 basic_string_char *this, MSVCP_size_t pos)
1418 TRACE("%p %lu\n", this, pos);
1420 if(!this->ptr || pos>this->size)
1421 return (char*)basic_string_char__Nullstr();
1423 basic_string_char__Freeze(this);
1424 return this->ptr+pos;
1427 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */
1428 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */
1429 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_operator_at_const, 8)
1430 const char* __thiscall MSVCP_basic_string_char_operator_at_const(
1431 const basic_string_char *this, MSVCP_size_t pos)
1433 TRACE("%p %lu\n", this, pos);
1435 if(!this->ptr)
1436 return basic_string_char__Nullstr();
1437 return this->ptr+pos;
1440 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */
1441 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */
1442 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */
1443 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */
1444 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_at, 8)
1445 char* __thiscall MSVCP_basic_string_char_at(
1446 basic_string_char *this, MSVCP_size_t pos)
1448 TRACE("%p %lu\n", this, pos);
1450 if(this->size <= pos)
1451 _Xran();
1453 return this->ptr+pos;
1456 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBDI@Z */
1457 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD0@Z */
1458 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_cstr_len, 20)
1459 basic_string_char* __thiscall basic_string_char_replace_cstr_len(basic_string_char *this,
1460 MSVCP_size_t off, MSVCP_size_t len, const char *str, MSVCP_size_t str_len)
1462 MSVCP_size_t inside_pos = -1;
1463 char *ptr = this->ptr;
1465 TRACE("%p %ld %ld %p %ld\n", this, off, len, str, str_len);
1467 if(this->size < off)
1468 _Xran();
1470 if(len > this->size-off)
1471 len = this->size-off;
1473 if(MSVCP_basic_string_char_npos-str_len <= this->size-len)
1474 _Xlen();
1476 if(basic_string_char_inside(this, str))
1477 inside_pos = str-ptr;
1479 if(this->size-len+str_len)
1480 basic_string_char__Grow(this, this->size-len+str_len, FALSE);
1481 ptr = this->ptr;
1483 if(inside_pos == -1) {
1484 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1485 memcpy(ptr+off, str, str_len*sizeof(char));
1486 } else if(len >= str_len) {
1487 memmove(ptr+off, ptr+inside_pos, str_len*sizeof(char));
1488 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1489 } else {
1490 MSVCP_size_t size;
1492 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1494 if(inside_pos < off+len) {
1495 size = off+len-inside_pos;
1496 if(size > str_len)
1497 size = str_len;
1498 memmove(ptr+off, ptr+inside_pos, size*sizeof(char));
1499 } else {
1500 size = 0;
1503 if(str_len > size)
1504 memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(char));
1507 if(this->ptr)
1508 basic_string_char__Eos(this, this->size-len+str_len);
1509 return this;
1512 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@II@Z */
1513 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0AEBV12@00@Z */
1514 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_substr, 24)
1515 basic_string_char* __thiscall basic_string_char_replace_substr(basic_string_char *this, MSVCP_size_t off,
1516 MSVCP_size_t len, const basic_string_char *str, MSVCP_size_t str_off, MSVCP_size_t str_len)
1518 if(str->size < str_off)
1519 _Xran();
1521 if(str_len > str->size-str_off)
1522 str_len = str->size-str_off;
1524 return basic_string_char_replace_cstr_len(this, off, len,
1525 str->ptr+str_off, str_len);
1528 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@@Z */
1529 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0AEBV12@@Z */
1530 DEFINE_THISCALL_WRAPPER(basic_string_char_replace, 16)
1531 basic_string_char* __thiscall basic_string_char_replace(basic_string_char *this,
1532 MSVCP_size_t off, MSVCP_size_t len, const basic_string_char *str)
1534 return basic_string_char_replace_cstr_len(this, off, len,
1535 str->ptr, str->size);
1538 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIID@Z */
1539 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K00D@Z */
1540 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_ch, 20)
1541 basic_string_char* __thiscall basic_string_char_replace_ch(basic_string_char *this,
1542 MSVCP_size_t off, MSVCP_size_t len, MSVCP_size_t count, char ch)
1544 char *ptr;
1546 TRACE("%p %ld %ld %ld %c\n", this, off, len, count, ch);
1548 if(this->size < off)
1549 _Xran();
1551 if(len > this->size-off)
1552 len = this->size-off;
1554 if(MSVCP_basic_string_char_npos-count <= this->size-len)
1555 _Xlen();
1557 if(this->size-len+count)
1558 basic_string_char__Grow(this, this->size-len+count, FALSE);
1559 ptr = this->ptr;
1561 memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(char));
1562 MSVCP_char_traits_char_assignn(ptr+off, count, ch);
1563 basic_string_char__Eos(this, this->size-len+count);
1565 return this;
1568 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBD@Z */
1569 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD@Z */
1570 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_cstr, 16)
1571 basic_string_char* __thiscall basic_string_char_replace_cstr(basic_string_char *this,
1572 MSVCP_size_t off, MSVCP_size_t len, const char *str)
1574 return basic_string_char_replace_cstr_len(this, off, len, str,
1575 MSVCP_char_traits_char_length(str));
1578 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IABV12@@Z */
1579 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KAEBV12@@Z */
1580 DEFINE_THISCALL_WRAPPER(basic_string_char_insert, 12)
1581 basic_string_char* __thiscall basic_string_char_insert(basic_string_char *this,
1582 MSVCP_size_t off, const basic_string_char *str)
1584 return basic_string_char_replace(this, off, 0, str);
1587 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IABV12@II@Z */
1588 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KAEBV12@00@Z */
1589 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_substr, 20)
1590 basic_string_char* __thiscall basic_string_char_insert_substr(
1591 basic_string_char *this, MSVCP_size_t off, const basic_string_char *str,
1592 MSVCP_size_t str_off, MSVCP_size_t str_count)
1594 return basic_string_char_replace_substr(this, off, 0, str, str_off, str_count);
1597 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IPBD@Z */
1598 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KPEBD@Z */
1599 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_cstr, 12)
1600 basic_string_char* __thiscall basic_string_char_insert_cstr(
1601 basic_string_char *this, MSVCP_size_t off, const char *str)
1603 return basic_string_char_replace_cstr(this, off, 0, str);
1606 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IPBDI@Z */
1607 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KPEBD0@Z */
1608 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_cstr_len, 16)
1609 basic_string_char* __thiscall basic_string_char_insert_cstr_len(basic_string_char *this,
1610 MSVCP_size_t off, const char *str, MSVCP_size_t str_len)
1612 return basic_string_char_replace_cstr_len(this, off, 0, str, str_len);
1615 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IID@Z */
1616 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0D@Z */
1617 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_chn, 16)
1618 basic_string_char* __thiscall basic_string_char_insert_chn(basic_string_char *this,
1619 MSVCP_size_t off, MSVCP_size_t count, char ch)
1621 return basic_string_char_replace_ch(this, off, 0, count, ch);
1624 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXID@Z */
1625 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_KD@Z */
1626 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_resize_ch, 12)
1627 void __thiscall MSVCP_basic_string_char_resize_ch(
1628 basic_string_char *this, MSVCP_size_t size, char ch)
1630 TRACE("%p %lu %c\n", this, size, ch);
1632 if(size <= this->size)
1633 MSVCP_basic_string_char_erase(this, size, this->size);
1634 else
1635 MSVCP_basic_string_char_append_len_ch(this, size-this->size, ch);
1638 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z */
1639 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z */
1640 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_resize, 8)
1641 void __thiscall MSVCP_basic_string_char_resize(
1642 basic_string_char *this, MSVCP_size_t size)
1644 MSVCP_basic_string_char_resize_ch(this, size, '\0');
1647 /* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1648 /* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1649 /* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1650 /* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1651 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_c_str, 4)
1652 const char* __thiscall MSVCP_basic_string_char_c_str(const basic_string_char *this)
1654 TRACE("%p\n", this);
1655 return this->ptr ? this->ptr : basic_string_char__Nullstr();
1658 /* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1659 /* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1660 /* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1661 /* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1662 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_length, 4)
1663 MSVCP_size_t __thiscall MSVCP_basic_string_char_length(const basic_string_char *this)
1665 TRACE("%p\n", this);
1666 return this->size;
1669 /* ?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1670 /* ?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1671 DEFINE_THISCALL_WRAPPER(basic_string_char_max_size, 4)
1672 MSVCP_size_t __thiscall basic_string_char_max_size(const basic_string_char *this)
1674 TRACE("%p\n", this);
1675 return MSVCP_allocator_char_max_size(NULL)-1;
1678 /* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1679 /* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1680 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_capacity, 4)
1681 MSVCP_size_t __thiscall MSVCP_basic_string_char_capacity(basic_string_char *this)
1683 TRACE("%p\n", this);
1684 return this->res;
1687 /* ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z */
1688 /* ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z */
1689 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_reserve, 8)
1690 void __thiscall MSVCP_basic_string_char_reserve(basic_string_char *this, MSVCP_size_t size)
1692 MSVCP_size_t len;
1694 TRACE("%p %ld\n", this, size);
1696 len = this->size;
1697 if(len > size)
1698 return;
1700 if(basic_string_char__Grow(this, size, FALSE))
1701 basic_string_char__Eos(this, len);
1704 /* ?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE_NXZ */
1705 /* ?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_NXZ */
1706 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_empty, 4)
1707 MSVCP_bool __thiscall MSVCP_basic_string_char_empty(basic_string_char *this)
1709 TRACE("%p\n", this);
1710 return this->size == 0;
1713 /* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXAAV12@@Z */
1714 /* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEAV12@@Z */
1715 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_swap, 8)
1716 void __thiscall MSVCP_basic_string_char_swap(basic_string_char *this, basic_string_char *str)
1718 basic_string_char tmp;
1719 TRACE("%p %p\n", this, str);
1721 tmp = *this;
1722 *this = *str;
1723 *str = tmp;
1726 /* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV12@II@Z */
1727 /* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV12@_K0@Z */
1728 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_substr, 16)
1729 basic_string_char* __thiscall MSVCP_basic_string_char_substr(basic_string_char *this,
1730 basic_string_char *ret, MSVCP_size_t off, MSVCP_size_t len)
1732 TRACE("%p %lu %lu\n", this, off, len);
1734 MSVCP_basic_string_char_ctor_substr_alloc(ret, this, off, len, NULL);
1735 return ret;
1738 /* ?copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPADII@Z */
1739 /* ?copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEAD_K1@Z */
1740 DEFINE_THISCALL_WRAPPER(basic_string_char_copy, 16)
1741 MSVCP_size_t __thiscall basic_string_char_copy(const basic_string_char *this,
1742 char *dest, MSVCP_size_t count, MSVCP_size_t off)
1744 TRACE("%p %p %lu %lu\n", this, dest, count, off);
1746 if(off > this->size)
1747 _Xran();
1748 if(count > this->size-off)
1749 count = this->size-off;
1750 if(this->ptr)
1751 MSVCP_char_traits_char__Copy_s(dest, count, this->ptr+off, count);
1752 return count;
1755 /* ?get_allocator@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$allocator@D@2@XZ */
1756 /* ?get_allocator@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$allocator@D@2@XZ */
1757 DEFINE_THISCALL_WRAPPER(basic_string_char_get_allocator, 8)
1758 allocator* __thiscall basic_string_char_get_allocator(const basic_string_char *this, allocator *ret)
1760 TRACE("%p\n", this);
1761 return ret;
1764 static MSVCP_bool basic_string_wchar_inside(
1765 basic_string_wchar *this, const wchar_t *ptr)
1767 return ptr>=this->ptr && ptr<this->ptr+this->size;
1770 /* ?npos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@2IB */
1771 /* ?npos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@2_KB */
1772 const MSVCP_size_t MSVCP_basic_string_wchar_npos = -1;
1774 /* ?_C@?1??_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGXZ@4GB */
1775 /* ?_C@?1??_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGXZ@4GB */
1776 const wchar_t basic_string_wchar_nullbyte = '\0';
1778 /* ?_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGXZ */
1779 /* ?_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGXZ */
1780 const wchar_t* __cdecl basic_string_wchar__Nullstr(void)
1782 return &basic_string_wchar_nullbyte;
1785 /* ?_Refcnt@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEAAEPBG@Z */
1786 /* ?_Refcnt@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAAEAEPEBG@Z */
1787 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Refcnt, 8)
1788 unsigned short* __thiscall basic_string_wchar__Refcnt(basic_string_wchar *this, const wchar_t *ptr)
1790 TRACE("(%p %p)\n", this, ptr);
1791 return (unsigned short*)ptr-1;
1794 /* ?_Eos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXI@Z */
1795 /* ?_Eos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_K@Z */
1796 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Eos, 8)
1797 void __thiscall basic_string_wchar__Eos(basic_string_wchar *this, MSVCP_size_t len)
1799 this->size = len;
1800 this->ptr[len] = 0;
1803 /* ?clear@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
1804 /* ?clear@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
1805 /* ?clear@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
1806 /* ?clear@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
1807 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_clear, 4)
1808 void __thiscall MSVCP_basic_string_wchar_clear(basic_string_wchar *this)
1810 if(this->ptr)
1811 basic_string_wchar__Eos(this, 0);
1814 /* ?_Tidy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEX_N@Z */
1815 /* ?_Tidy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_N@Z */
1816 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Tidy, 8)
1817 void __thiscall basic_string_wchar__Tidy(basic_string_wchar *this, MSVCP_bool built)
1819 TRACE("(%p %d)\n", this, built);
1821 if(!built || !this->ptr);
1822 else if(!this->ptr[-1] || (unsigned short)this->ptr[-1]==FROZEN)
1823 MSVCP_allocator_wchar_deallocate(NULL, this->ptr-1, this->res+2);
1824 else
1825 this->ptr[-1]--;
1827 memset(this, 0, sizeof(*this));
1830 /* ?_Grow@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAE_NI_N@Z */
1831 /* ?_Grow@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAA_N_K_N@Z */
1832 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Grow, 12)
1833 MSVCP_bool __thiscall basic_string_wchar__Grow(basic_string_wchar *this, MSVCP_size_t new_size, MSVCP_bool trim)
1835 if(!new_size) {
1836 if(trim)
1837 basic_string_wchar__Tidy(this, TRUE);
1838 else if(this->ptr)
1839 basic_string_wchar__Eos(this, 0);
1840 } else if(this->res<new_size || trim ||
1841 (this->ptr && this->ptr[-1] && (unsigned short)this->ptr[-1]!=FROZEN)) {
1842 MSVCP_size_t new_res = new_size, len = this->size;
1843 wchar_t *ptr;
1845 if(!trim && this->ptr && !this->ptr[-1]) {
1846 new_res |= 0xf;
1847 if(new_res/3 < this->res/2)
1848 new_res = this->res + this->res/2;
1851 ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_res+2);
1852 if(!ptr) {
1853 new_res = new_size;
1854 ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_size+2);
1856 if(!ptr) {
1857 ERR("Out of memory\n");
1858 return FALSE;
1861 if(len > new_res)
1862 len = new_res;
1864 *ptr = 0;
1865 if(this->ptr)
1866 MSVCP_char_traits_wchar__Copy_s(ptr+1, new_size, this->ptr, len);
1867 basic_string_wchar__Tidy(this, TRUE);
1868 this->ptr = ptr+1;
1869 this->res = new_res;
1870 basic_string_wchar__Eos(this, len);
1873 return new_size>0;
1876 /* ?_Split@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXXZ */
1877 /* ?_Split@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAXXZ */
1878 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Split, 4)
1879 void __thiscall basic_string_wchar__Split(basic_string_wchar *this)
1881 MSVCP_size_t len;
1882 wchar_t *ptr;
1884 TRACE("(%p)\n", this);
1886 if(!this->ptr || !this->ptr[-1] || (unsigned short)this->ptr[-1]==FROZEN)
1887 return;
1889 ptr = this->ptr;
1890 len = this->size;
1891 basic_string_wchar__Tidy(this, TRUE);
1892 if(basic_string_wchar__Grow(this, len, FALSE)) {
1893 if(ptr)
1894 MSVCP_char_traits_wchar__Copy_s(this->ptr, this->res, ptr, len);
1895 basic_string_wchar__Eos(this, len);
1899 /* ?_Freeze@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXXZ */
1900 /* ?_Freeze@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAXXZ */
1901 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Freeze, 4)
1902 void __thiscall basic_string_wchar__Freeze(basic_string_wchar *this)
1904 TRACE("(%p)\n", this);
1905 basic_string_wchar__Split(this);
1906 if(this->ptr)
1907 this->ptr[-1] = FROZEN;
1910 /* ?_Copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXI@Z */
1911 /* ?_Copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_K@Z */
1912 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Copy, 8)
1913 void __thiscall basic_string_wchar__Copy(basic_string_wchar *this, MSVCP_size_t copy_len)
1915 TRACE("%p %lu\n", this, copy_len);
1917 if(!basic_string_wchar__Grow(this, copy_len, TRUE))
1918 return;
1921 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPAGPAGI@Z */
1922 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEAGPEAG_K@Z */
1923 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGPBGI@Z */
1924 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGPEBG_K@Z */
1925 wchar_t* __cdecl basic_string_wchar__Psum(wchar_t *iter, MSVCP_size_t add)
1927 TRACE("(%p %lu)\n", iter, add);
1928 return iter ? iter+add : iter;
1931 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@II@Z */
1932 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0@Z */
1933 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_erase, 12)
1934 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_erase(
1935 basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t len)
1937 TRACE("%p %lu %lu\n", this, pos, len);
1939 if(pos > this->size)
1940 _Xran();
1942 if(len > this->size-pos)
1943 len = this->size-pos;
1945 if(len) {
1946 basic_string_wchar__Split(this);
1947 MSVCP_char_traits_wchar__Move_s(this->ptr+pos, this->res-pos,
1948 this->ptr+pos+len, this->size-pos-len);
1949 basic_string_wchar__Eos(this, this->size-len);
1952 return this;
1955 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAG@Z */
1956 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAG@Z */
1957 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase_beg, 8)
1958 wchar_t* __thiscall basic_string_wchar_erase_beg(basic_string_wchar *this, wchar_t *beg)
1960 MSVCP_size_t pos = beg-this->ptr;
1961 MSVCP_basic_string_wchar_erase(this, pos, 1);
1962 return this->ptr+pos;
1965 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@II@Z */
1966 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
1967 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_substr, 16)
1968 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_substr(
1969 basic_string_wchar *this, const basic_string_wchar *assign,
1970 MSVCP_size_t pos, MSVCP_size_t len)
1972 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
1974 if(assign->size < pos)
1975 _Xran();
1977 if(len > assign->size-pos)
1978 len = assign->size-pos;
1980 if(this == assign) {
1981 MSVCP_basic_string_wchar_erase(this, pos+len, MSVCP_basic_string_wchar_npos);
1982 MSVCP_basic_string_wchar_erase(this, 0, pos);
1983 } else if(basic_string_wchar__Grow(this, len, FALSE)) {
1984 if(assign->ptr)
1985 MSVCP_char_traits_wchar__Copy_s(this->ptr, this->res,
1986 assign->ptr+pos, len);
1987 basic_string_wchar__Eos(this, len);
1990 return this;
1993 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBGI@Z */
1994 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG_K@Z */
1995 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_cstr_len, 12)
1996 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_cstr_len(
1997 basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
1999 TRACE("%p %s %lu\n", this, debugstr_wn(str, len), len);
2001 if(basic_string_wchar_inside(this, str))
2002 return MSVCP_basic_string_wchar_assign_substr(this, this, str-this->ptr, len);
2003 else if(basic_string_wchar__Grow(this, len, FALSE)) {
2004 MSVCP_char_traits_wchar__Copy_s(this->ptr, this->res, str, len);
2005 basic_string_wchar__Eos(this, len);
2008 return this;
2011 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@@Z */
2012 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@@Z */
2013 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@ABV01@@Z */
2014 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@AEBV01@@Z */
2015 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign, 8)
2016 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign(
2017 basic_string_wchar *this, const basic_string_wchar *assign)
2019 return MSVCP_basic_string_wchar_assign_substr(this, assign,
2020 0, MSVCP_basic_string_wchar_npos);
2023 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG@Z */
2024 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG@Z */
2025 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@PBG@Z */
2026 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@PEBG@Z */
2027 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_cstr, 8)
2028 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_cstr(
2029 basic_string_wchar *this, const wchar_t *str)
2031 return MSVCP_basic_string_wchar_assign_cstr_len(this, str,
2032 MSVCP_char_traits_wchar_length(str));
2035 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@G@Z */
2036 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@G@Z */
2037 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_ch, 8)
2038 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_ch(
2039 basic_string_wchar *this, wchar_t ch)
2041 return MSVCP_basic_string_wchar_assign_cstr_len(this, &ch, 1);
2044 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IG@Z */
2045 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KG@Z */
2046 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assignn, 12)
2047 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assignn(
2048 basic_string_wchar *this, MSVCP_size_t count, wchar_t ch)
2050 TRACE("%p %ld %c\n", this, count, ch);
2052 basic_string_wchar__Grow(this, count, FALSE);
2053 MSVCP_char_traits_wchar_assignn(this->ptr, count, ch);
2054 basic_string_wchar__Eos(this, count);
2055 return this;
2058 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG0@Z */
2059 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG0@Z */
2060 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_ptr_ptr, 12)
2061 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_ptr_ptr(
2062 basic_string_wchar *this, const wchar_t *first, const wchar_t *last)
2064 return MSVCP_basic_string_wchar_assign_cstr_len(this, first, last-first);
2067 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBGIABV?$allocator@G@1@@Z */
2068 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG_KAEBV?$allocator@G@1@@Z */
2069 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_cstr_len_alloc, 16)
2070 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_len_alloc(
2071 basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len, const void *alloc)
2073 TRACE("%p %s %ld\n", this, debugstr_wn(str, len), len);
2075 basic_string_wchar__Tidy(this, FALSE);
2076 MSVCP_basic_string_wchar_assign_cstr_len(this, str, len);
2077 return this;
2080 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@PB_WI@Z */
2081 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@PEB_W_K@Z */
2082 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBGI@Z */
2083 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG_K@Z */
2084 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_cstr_len, 12)
2085 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_len(
2086 basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
2088 return MSVCP_basic_string_wchar_ctor_cstr_len_alloc(this, str, len, NULL);
2091 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV01@IIABV?$allocator@G@1@@Z */
2092 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV01@_K1AEBV?$allocator@G@1@@Z */
2093 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_substr_alloc, 20)
2094 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_substr_alloc(
2095 basic_string_wchar *this, const basic_string_wchar *assign,
2096 MSVCP_size_t pos, MSVCP_size_t len, const void *alloc)
2098 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
2100 basic_string_wchar__Tidy(this, FALSE);
2101 MSVCP_basic_string_wchar_assign_substr(this, assign, pos, len);
2102 return this;
2105 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBGABV?$allocator@G@1@@Z */
2106 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBGAEBV?$allocator@G@1@@Z */
2107 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_cstr_alloc, 12)
2108 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_alloc(
2109 basic_string_wchar *this, const wchar_t *str, const void *alloc)
2111 TRACE("%p %s\n", this, debugstr_w(str));
2113 basic_string_wchar__Tidy(this, FALSE);
2114 MSVCP_basic_string_wchar_assign_cstr(this, str);
2115 return this;
2118 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@PB_W@Z */
2119 /* ??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@PEB_W@Z */
2120 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBG@Z */
2121 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG@Z */
2122 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_cstr, 8)
2123 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr(
2124 basic_string_wchar *this, const wchar_t *str)
2126 return MSVCP_basic_string_wchar_ctor_cstr_alloc(this, str, NULL);
2129 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@IGABV?$allocator@G@1@@Z */
2130 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@_KGAEBV?$allocator@G@1@@Z */
2131 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_ch_alloc, 16)
2132 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_ch_alloc(basic_string_wchar *this,
2133 MSVCP_size_t count, wchar_t ch, const void *alloc)
2135 TRACE("%p %ld %c\n", this, count, ch);
2137 basic_string_wchar__Tidy(this, FALSE);
2138 MSVCP_basic_string_wchar_assignn(this, count, ch);
2139 return this;
2142 /* ??_F?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
2143 /* ??_F?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
2144 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor, 4)
2145 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor(basic_string_wchar *this)
2147 TRACE("%p\n", this);
2149 basic_string_wchar__Tidy(this, FALSE);
2150 return this;
2153 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$allocator@G@1@@Z */
2154 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV?$allocator@G@1@@Z */
2155 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_alloc, 8)
2156 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_alloc(
2157 basic_string_wchar *this, const void *alloc)
2159 TRACE("%p %p\n", this, alloc);
2161 basic_string_wchar__Tidy(this, FALSE);
2162 return this;
2165 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV01@@Z */
2166 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV01@@Z */
2167 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_copy_ctor, 8)
2168 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_copy_ctor(
2169 basic_string_wchar *this, const basic_string_wchar *copy)
2171 TRACE("%p %p\n", this, copy);
2173 basic_string_wchar__Tidy(this, FALSE);
2174 MSVCP_basic_string_wchar_assign(this, copy);
2175 return this;
2178 /* ??1?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@XZ */
2179 /* ??1?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@XZ */
2180 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_dtor, 4)
2181 void __thiscall MSVCP_basic_string_wchar_dtor(basic_string_wchar *this)
2183 TRACE("%p\n", this);
2184 basic_string_wchar__Tidy(this, TRUE);
2187 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIPBGI@Z */
2188 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0PEBG0@Z */
2189 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_substr_cstr_len, 20)
2190 int __thiscall MSVCP_basic_string_wchar_compare_substr_cstr_len(
2191 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2192 const wchar_t *str, MSVCP_size_t count)
2194 int ans;
2196 TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_wn(str, count), count);
2198 if(this->size < pos)
2199 _Xran();
2201 if(num > this->size-pos)
2202 num = this->size-pos;
2204 ans = MSVCP_char_traits_wchar_compare(this->ptr+pos,
2205 str, num>count ? count : num);
2206 if(ans)
2207 return ans;
2209 if(num > count)
2210 ans = 1;
2211 else if(num < count)
2212 ans = -1;
2213 return ans;
2216 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHPBG@Z */
2217 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAHPEBG@Z */
2218 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_cstr, 8)
2219 int __thiscall MSVCP_basic_string_wchar_compare_cstr(
2220 const basic_string_wchar *this, const wchar_t *str)
2222 return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, 0, this->size,
2223 str, MSVCP_char_traits_wchar_length(str));
2226 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIABV12@II@Z */
2227 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0AEBV12@00@Z */
2228 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_substr_substr, 24)
2229 int __thiscall MSVCP_basic_string_wchar_compare_substr_substr(
2230 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2231 const basic_string_wchar *compare, MSVCP_size_t off, MSVCP_size_t count)
2233 TRACE("%p %lu %lu %p %lu %lu\n", this, pos, num, compare, off, count);
2235 if(compare->size < off)
2236 _Xran();
2238 if(count > compare->size-off)
2239 count = compare->size-off;
2241 return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2242 compare->ptr+off, count);
2245 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIABV12@@Z */
2246 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0AEBV12@@Z */
2247 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_substr, 16)
2248 int __thiscall MSVCP_basic_string_wchar_compare_substr(
2249 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2250 const basic_string_wchar *compare)
2252 return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2253 compare->ptr, compare->size);
2256 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHABV12@@Z */
2257 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAHAEBV12@@Z */
2258 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare, 8)
2259 int __thiscall MSVCP_basic_string_wchar_compare(
2260 const basic_string_wchar *this, const basic_string_wchar *compare)
2262 return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, 0, this->size,
2263 compare->ptr, compare->size);
2266 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIPBG@Z */
2267 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0PEBG@Z */
2268 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_compare_substr_cstr, 16)
2269 int __thiscall MSVCP_basic_string_wchar_compare_substr_cstr(const basic_string_wchar *this,
2270 MSVCP_size_t pos, MSVCP_size_t num, const wchar_t *str)
2272 return MSVCP_basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2273 str, MSVCP_char_traits_wchar_length(str));
2276 /* ??$?8GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2277 /* ??$?8GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2278 /* ??8std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2279 /* ??8std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2280 MSVCP_bool __cdecl MSVCP_basic_string_wchar_equal(
2281 const basic_string_wchar *left, const basic_string_wchar *right)
2283 return MSVCP_basic_string_wchar_compare(left, right) == 0;
2286 /* ??$?8GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2287 /* ??$?8GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2288 /* ??8std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2289 /* ??8std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2290 MSVCP_bool __cdecl MSVCP_basic_string_wchar_equal_str_cstr(
2291 const basic_string_wchar *left, const wchar_t *right)
2293 return MSVCP_basic_string_wchar_compare_cstr(left, right) == 0;
2296 /* ??$?8GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2297 /* ??$?8GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2298 /* ??8std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2299 /* ??8std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2300 MSVCP_bool __cdecl MSVCP_basic_string_wchar_equal_cstr_str(
2301 const wchar_t *left, const basic_string_wchar *right)
2303 return MSVCP_basic_string_wchar_compare_cstr(right, left) == 0;
2306 /* ??$?9GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2307 /* ??$?9GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2308 /* ??9std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2309 /* ??9std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2310 MSVCP_bool __cdecl MSVCP_basic_string_wchar_not_equal(
2311 const basic_string_wchar *left, const basic_string_wchar *right)
2313 return MSVCP_basic_string_wchar_compare(left, right) != 0;
2316 /* ??$?9GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2317 /* ??$?9GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2318 /* ??9std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2319 /* ??9std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2320 MSVCP_bool __cdecl MSVCP_basic_string_wchar_not_equal_str_cstr(
2321 const basic_string_wchar *left, const wchar_t *right)
2323 return MSVCP_basic_string_wchar_compare_cstr(left, right) != 0;
2326 /* ??$?9GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2327 /* ??$?9GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2328 /* ??9std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2329 /* ??9std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2330 MSVCP_bool __cdecl MSVCP_basic_string_wchar_not_equal_cstr_str(
2331 const wchar_t *left, const basic_string_wchar *right)
2333 return MSVCP_basic_string_wchar_compare_cstr(right, left) != 0;
2336 /* ??$?MGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2337 /* ??$?MGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2338 /* ??Mstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2339 /* ??Mstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2340 MSVCP_bool __cdecl MSVCP_basic_string_wchar_lower(
2341 const basic_string_wchar *left, const basic_string_wchar *right)
2343 return MSVCP_basic_string_wchar_compare(left, right) < 0;
2346 /* ??$?MGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2347 /* ??$?MGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2348 /* ??Mstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2349 /* ??Mstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2350 MSVCP_bool __cdecl MSVCP_basic_string_wchar_lower_bstr_cstr(
2351 const basic_string_wchar *left, const wchar_t *right)
2353 return MSVCP_basic_string_wchar_compare_cstr(left, right) < 0;
2356 /* ??$?MGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2357 /* ??$?MGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2358 /* ??Mstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2359 /* ??Mstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2360 MSVCP_bool __cdecl MSVCP_basic_string_wchar_lower_cstr_bstr(
2361 const wchar_t *left, const basic_string_wchar *right)
2363 return MSVCP_basic_string_wchar_compare_cstr(right, left) > 0;
2366 /* ??$?NGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2367 /* ??$?NGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2368 /* ??Nstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2369 /* ??Nstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2370 MSVCP_bool __cdecl MSVCP_basic_string_wchar_leq(
2371 const basic_string_wchar *left, const basic_string_wchar *right)
2373 return MSVCP_basic_string_wchar_compare(left, right) <= 0;
2376 /* ??$?NGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2377 /* ??$?NGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2378 /* ??Nstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2379 /* ??Nstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2380 MSVCP_bool __cdecl MSVCP_basic_string_wchar_leq_bstr_cstr(
2381 const basic_string_wchar *left, const wchar_t *right)
2383 return MSVCP_basic_string_wchar_compare_cstr(left, right) <= 0;
2386 /* ??$?NGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2387 /* ??$?NGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2388 /* ??Nstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2389 /* ??Nstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2390 MSVCP_bool __cdecl MSVCP_basic_string_wchar_leq_cstr_bstr(
2391 const wchar_t *left, const basic_string_wchar *right)
2393 return MSVCP_basic_string_wchar_compare_cstr(right, left) >= 0;
2396 /* ??$?OGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2397 /* ??$?OGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2398 /* ??Ostd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2399 /* ??Ostd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2400 MSVCP_bool __cdecl MSVCP_basic_string_wchar_greater(
2401 const basic_string_wchar *left, const basic_string_wchar *right)
2403 return MSVCP_basic_string_wchar_compare(left, right) > 0;
2406 /* ??$?OGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2407 /* ??$?OGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2408 /* ??Ostd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2409 /* ??Ostd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2410 MSVCP_bool __cdecl MSVCP_basic_string_wchar_greater_bstr_cstr(
2411 const basic_string_wchar *left, const wchar_t *right)
2413 return MSVCP_basic_string_wchar_compare_cstr(left, right) > 0;
2416 /* ??$?OGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2417 /* ??$?OGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2418 /* ??Ostd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2419 /* ??Ostd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2420 MSVCP_bool __cdecl MSVCP_basic_string_wchar_greater_cstr_bstr(
2421 const wchar_t *left, const basic_string_wchar *right)
2423 return MSVCP_basic_string_wchar_compare_cstr(right, left) < 0;
2426 /* ??$?PGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2427 /* ??$?PGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2428 /* ??Pstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2429 /* ??Pstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2430 MSVCP_bool __cdecl MSVCP_basic_string_wchar_geq(
2431 const basic_string_wchar *left, const basic_string_wchar *right)
2433 return MSVCP_basic_string_wchar_compare(left, right) >= 0;
2436 /* ??$?PGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2437 /* ??$?PGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2438 /* ??Pstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2439 /* ??Pstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2440 MSVCP_bool __cdecl MSVCP_basic_string_wchar_geq_bstr_cstr(
2441 const basic_string_wchar *left, const wchar_t *right)
2443 return MSVCP_basic_string_wchar_compare_cstr(left, right) >= 0;
2446 /* ??$?PGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2447 /* ??$?PGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2448 /* ??Pstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2449 /* ??Pstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2450 MSVCP_bool __cdecl MSVCP_basic_string_wchar_geq_cstr_bstr(
2451 const wchar_t *left, const basic_string_wchar *right)
2453 return MSVCP_basic_string_wchar_compare_cstr(right, left) <= 0;
2456 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2457 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2458 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_cstr_substr, 16)
2459 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_cstr_substr(
2460 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos, MSVCP_size_t len)
2462 const wchar_t *p, *end;
2464 TRACE("%p %s %lu %lu\n", this, debugstr_wn(find, len), pos, len);
2466 if(len==0 && pos<=this->size)
2467 return pos;
2468 if(pos>=this->size || len>this->size)
2469 return MSVCP_basic_string_wchar_npos;
2471 end = this->ptr+this->size-len+1;
2472 for(p=this->ptr+pos; p<end; p++) {
2473 p = MSVCP_char_traits_wchar_find(p, end-p, find);
2474 if(!p)
2475 break;
2477 if(!MSVCP_char_traits_wchar_compare(p, find, len))
2478 return p-this->ptr;
2481 return MSVCP_basic_string_wchar_npos;
2484 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2485 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2486 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_off, 12)
2487 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_off(
2488 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2490 return MSVCP_basic_string_wchar_find_cstr_substr(this, find->ptr, off, find->size);
2493 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2494 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2495 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_ch, 12)
2496 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_ch(
2497 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t pos)
2499 return MSVCP_basic_string_wchar_find_cstr_substr(this, &ch, pos, 1);
2502 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2503 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2504 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_cstr_off, 12)
2505 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_cstr_off(
2506 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos)
2508 return MSVCP_basic_string_wchar_find_cstr_substr(this, find, pos,
2509 MSVCP_char_traits_wchar_length(find));
2512 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2513 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2514 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_rfind_cstr_substr, 16)
2515 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_rfind_cstr_substr(
2516 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos, MSVCP_size_t len)
2518 const wchar_t *p, *end;
2520 TRACE("%p %s %lu %lu\n", this, debugstr_wn(find, len), pos, len);
2522 if(len==0)
2523 return pos<this->size ? pos : this->size;
2525 if(len > this->size)
2526 return MSVCP_basic_string_wchar_npos;
2528 if(pos > this->size-len)
2529 pos = this->size-len;
2530 end = this->ptr;
2531 for(p=end+pos; p>=end; p--) {
2532 if(*p==*find && !MSVCP_char_traits_wchar_compare(p, find, len))
2533 return p-this->ptr;
2536 return MSVCP_basic_string_wchar_npos;
2539 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2540 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2541 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_rfind_off, 12)
2542 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_rfind_off(
2543 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2545 return MSVCP_basic_string_wchar_rfind_cstr_substr(this, find->ptr, off, find->size);
2548 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2549 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2550 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_rfind_ch, 12)
2551 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_rfind_ch(
2552 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t pos)
2554 return MSVCP_basic_string_wchar_rfind_cstr_substr(this, &ch, pos, 1);
2557 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2558 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2559 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_rfind_cstr_off, 12)
2560 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_rfind_cstr_off(
2561 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos)
2563 return MSVCP_basic_string_wchar_rfind_cstr_substr(this, find, pos,
2564 MSVCP_char_traits_wchar_length(find));
2567 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2568 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2569 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_not_of_cstr_substr, 16)
2570 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_not_of_cstr_substr(
2571 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2573 const wchar_t *p, *end;
2575 TRACE("%p %p %lu %lu\n", this, find, off, len);
2577 if(off<this->size) {
2578 end = this->ptr+this->size;
2579 for(p=this->ptr+off; p<end; p++)
2580 if(!MSVCP_char_traits_wchar_find(find, len, p))
2581 return p-this->ptr;
2584 return MSVCP_basic_string_wchar_npos;
2587 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2588 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2589 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_not_of, 12)
2590 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_not_of(
2591 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2593 return MSVCP_basic_string_wchar_find_first_not_of_cstr_substr(this,
2594 find->ptr, off, find->size);
2597 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2598 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2599 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_not_of_ch, 12)
2600 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_not_of_ch(
2601 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2603 return MSVCP_basic_string_wchar_find_first_not_of_cstr_substr(this, &ch, off, 1);
2606 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2607 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2608 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_not_of_cstr, 12)
2609 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_not_of_cstr(
2610 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2612 return MSVCP_basic_string_wchar_find_first_not_of_cstr_substr(
2613 this, find, off, MSVCP_char_traits_wchar_length(find));
2616 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2617 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2618 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_of_cstr_substr, 16)
2619 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_of_cstr_substr(
2620 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2622 const wchar_t *p, *end;
2624 TRACE("%p %p %lu %lu\n", this, find, off, len);
2626 if(len>0 && off<this->size) {
2627 end = this->ptr+this->size;
2628 for(p=this->ptr+off; p<end; p++)
2629 if(MSVCP_char_traits_wchar_find(find, len, p))
2630 return p-this->ptr;
2633 return MSVCP_basic_string_wchar_npos;
2636 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2637 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2638 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_of, 12)
2639 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_of(
2640 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2642 return MSVCP_basic_string_wchar_find_first_of_cstr_substr(this,
2643 find->ptr, off, find->size);
2646 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2647 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2648 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_of_ch, 12)
2649 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_of_ch(
2650 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2652 return MSVCP_basic_string_wchar_find_first_of_cstr_substr(this, &ch, off, 1);
2655 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2656 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2657 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_first_of_cstr, 12)
2658 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_first_of_cstr(
2659 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2661 return MSVCP_basic_string_wchar_find_first_of_cstr_substr(
2662 this, find, off, MSVCP_char_traits_wchar_length(find));
2665 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2666 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2667 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_not_of_cstr_substr, 16)
2668 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_not_of_cstr_substr(
2669 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2671 const wchar_t *p, *beg;
2673 TRACE("%p %p %lu %lu\n", this, find, off, len);
2675 if(len>0 && this->size>0) {
2676 if(off >= this->size)
2677 off = this->size-1;
2679 beg = this->ptr;
2680 for(p=beg+off; p>=beg; p--)
2681 if(!MSVCP_char_traits_wchar_find(find, len, p))
2682 return p-beg;
2685 return MSVCP_basic_string_wchar_npos;
2688 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2689 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2690 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_not_of, 12)
2691 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_not_of(
2692 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2694 return MSVCP_basic_string_wchar_find_last_not_of_cstr_substr(this,
2695 find->ptr, off, find->size);
2698 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2699 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2700 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_not_of_ch, 12)
2701 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_not_of_ch(
2702 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2704 return MSVCP_basic_string_wchar_find_last_not_of_cstr_substr(this, &ch, off, 1);
2707 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2708 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2709 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_not_of_cstr, 12)
2710 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_not_of_cstr(
2711 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2713 return MSVCP_basic_string_wchar_find_last_not_of_cstr_substr(
2714 this, find, off, MSVCP_char_traits_wchar_length(find));
2717 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2718 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2719 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_of_cstr_substr, 16)
2720 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_of_cstr_substr(
2721 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2723 const wchar_t *p, *beg;
2725 TRACE("%p %p %lu %lu\n", this, find, off, len);
2727 if(len>0 && this->size>0) {
2728 if(off >= this->size)
2729 off = this->size-1;
2731 beg = this->ptr;
2732 for(p=beg+off; p>=beg; p--)
2733 if(MSVCP_char_traits_wchar_find(find, len, p))
2734 return p-beg;
2737 return MSVCP_basic_string_wchar_npos;
2740 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2741 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2742 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_of, 12)
2743 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_of(
2744 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2746 return MSVCP_basic_string_wchar_find_last_of_cstr_substr(this,
2747 find->ptr, off, find->size);
2750 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2751 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2752 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_of_ch, 12)
2753 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_of_ch(
2754 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2756 return MSVCP_basic_string_wchar_find_last_of_cstr_substr(this, &ch, off, 1);
2759 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2760 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2761 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_find_last_of_cstr, 12)
2762 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_last_of_cstr(
2763 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2765 return MSVCP_basic_string_wchar_find_last_of_cstr_substr(
2766 this, find, off, MSVCP_char_traits_wchar_length(find));
2769 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@II@Z */
2770 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
2771 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_substr, 16)
2772 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_substr(basic_string_wchar *this,
2773 const basic_string_wchar *append, MSVCP_size_t offset, MSVCP_size_t count)
2775 TRACE("%p %p %lu %lu\n", this, append, offset, count);
2777 if(append->size < offset)
2778 _Xran();
2780 if(count > append->size-offset)
2781 count = append->size-offset;
2783 if(MSVCP_basic_string_wchar_npos-this->size<=count || this->size+count<this->size)
2784 _Xlen();
2786 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2787 if(append->ptr)
2788 MSVCP_char_traits_wchar__Copy_s(this->ptr+this->size, this->res-this->size,
2789 append->ptr+offset, count);
2790 basic_string_wchar__Eos(this, this->size+count);
2793 return this;
2796 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBGI@Z */
2797 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG_K@Z */
2798 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_cstr_len, 12)
2799 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_cstr_len(
2800 basic_string_wchar *this, const wchar_t *append, MSVCP_size_t count)
2802 TRACE("%p %s %lu\n", this, debugstr_wn(append, count), count);
2804 if(basic_string_wchar_inside(this, append))
2805 return MSVCP_basic_string_wchar_append_substr(this, this, append-this->ptr, count);
2807 if(MSVCP_basic_string_wchar_npos-this->size<=count || this->size+count<this->size)
2808 _Xlen();
2810 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2811 MSVCP_char_traits_wchar__Copy_s(this->ptr+this->size,
2812 this->res-this->size, append, count);
2813 basic_string_wchar__Eos(this, this->size+count);
2816 return this;
2819 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IG@Z */
2820 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KG@Z */
2821 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_len_ch, 12)
2822 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_len_ch(
2823 basic_string_wchar *this, MSVCP_size_t count, wchar_t ch)
2825 TRACE("%p %lu %c\n", this, count, ch);
2827 if(MSVCP_basic_string_wchar_npos-this->size <= count)
2828 _Xlen();
2830 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2831 MSVCP_char_traits_wchar_assignn(this->ptr+this->size, count, ch);
2832 basic_string_wchar__Eos(this, this->size+count);
2835 return this;
2838 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@@Z */
2839 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@@Z */
2840 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@ABV01@@Z */
2841 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@AEBV01@@Z */
2842 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append, 8)
2843 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append(
2844 basic_string_wchar *this, const basic_string_wchar *append)
2846 return MSVCP_basic_string_wchar_append_substr(this, append,
2847 0, MSVCP_basic_string_wchar_npos);
2850 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@G@Z */
2851 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@G@Z */
2852 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_ch, 8)
2853 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_ch(
2854 basic_string_wchar *this, wchar_t ch)
2856 return MSVCP_basic_string_wchar_append_len_ch(this, 1, ch);
2859 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG0@Z */
2860 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG0@Z */
2861 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_beg_end, 12)
2862 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_beg_end(
2863 basic_string_wchar *this, const wchar_t *beg, const wchar_t *end)
2865 return MSVCP_basic_string_wchar_append_cstr_len(this, beg, end-beg);
2868 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG@Z */
2869 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG@Z */
2870 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@PBG@Z */
2871 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@PEBG@Z */
2872 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_cstr, 8)
2873 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_cstr(
2874 basic_string_wchar *this, const wchar_t *append)
2876 return MSVCP_basic_string_wchar_append_cstr_len(this, append,
2877 MSVCP_char_traits_wchar_length(append));
2879 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@0@Z */
2880 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@0@Z */
2881 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@0@Z */
2882 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@0@Z */
2883 basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate(basic_string_wchar *ret,
2884 const basic_string_wchar *left, const basic_string_wchar *right)
2886 TRACE("%p %p\n", left, right);
2888 MSVCP_basic_string_wchar_copy_ctor(ret, left);
2889 MSVCP_basic_string_wchar_append(ret, right);
2890 return ret;
2893 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@G@Z */
2894 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@G@Z */
2895 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@G@Z */
2896 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@G@Z */
2897 basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate_bstr_ch(basic_string_wchar *ret,
2898 const basic_string_wchar *left, wchar_t right)
2900 TRACE("%p %c\n", left, right);
2902 MSVCP_basic_string_wchar_copy_ctor(ret, left);
2903 MSVCP_basic_string_wchar_append_ch(ret, right);
2904 return ret;
2907 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@PBG@Z */
2908 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@PEBG@Z */
2909 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@PBG@Z */
2910 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@PEBG@Z */
2911 basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate_bstr_cstr(basic_string_wchar *ret,
2912 const basic_string_wchar *left, const wchar_t *right)
2914 TRACE("%p %s\n", left, debugstr_w(right));
2916 MSVCP_basic_string_wchar_copy_ctor(ret, left);
2917 MSVCP_basic_string_wchar_append_cstr(ret, right);
2918 return ret;
2921 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GABV10@@Z */
2922 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GAEBV10@@Z */
2923 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GABV10@@Z */
2924 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GAEBV10@@Z */
2925 basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate_ch_bstr(basic_string_wchar *ret,
2926 wchar_t left, const basic_string_wchar *right)
2928 TRACE("%c %p\n", left, right);
2930 MSVCP_basic_string_wchar_ctor_cstr_len_alloc(ret, &left, 1, NULL);
2931 MSVCP_basic_string_wchar_append(ret, right);
2932 return ret;
2935 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBGABV10@@Z */
2936 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBGAEBV10@@Z */
2937 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBGABV10@@Z */
2938 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBGAEBV10@@Z */
2939 basic_string_wchar* __cdecl MSVCP_basic_string_wchar_concatenate_cstr_bstr(basic_string_wchar *ret,
2940 const wchar_t *left, const basic_string_wchar *right)
2942 TRACE("%s %p\n", debugstr_w(left), right);
2944 MSVCP_basic_string_wchar_ctor_cstr_alloc(ret, left, NULL);
2945 MSVCP_basic_string_wchar_append(ret, right);
2946 return ret;
2949 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGI@Z */
2950 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAG_K@Z */
2951 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_operator_at, 8)
2952 wchar_t* __thiscall MSVCP_basic_string_wchar_operator_at(
2953 basic_string_wchar *this, MSVCP_size_t pos)
2955 TRACE("%p %lu\n", this, pos);
2957 if(!this->ptr || pos>this->size)
2958 return (wchar_t*)basic_string_wchar__Nullstr();
2960 basic_string_wchar__Freeze(this);
2961 return this->ptr+pos;
2964 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEABGI@Z */
2965 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAAEBG_K@Z */
2966 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_operator_at_const, 8)
2967 const wchar_t* __thiscall MSVCP_basic_string_wchar_operator_at_const(
2968 const basic_string_wchar *this, MSVCP_size_t pos)
2970 TRACE("%p %lu\n", this, pos);
2972 if(!this->ptr)
2973 return basic_string_wchar__Nullstr();
2974 return this->ptr+pos;
2977 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGI@Z */
2978 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAG_K@Z */
2979 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEABGI@Z */
2980 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAAEBG_K@Z */
2981 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_at, 8)
2982 wchar_t* __thiscall MSVCP_basic_string_wchar_at(
2983 basic_string_wchar *this, MSVCP_size_t pos)
2985 TRACE("%p %lu\n", this, pos);
2987 if(this->size <= pos)
2988 _Xran();
2990 return this->ptr+pos;
2993 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIPBGI@Z */
2994 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG0@Z */
2995 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_cstr_len, 20)
2996 basic_string_wchar* __thiscall basic_string_wchar_replace_cstr_len(basic_string_wchar *this,
2997 MSVCP_size_t off, MSVCP_size_t len, const wchar_t *str, MSVCP_size_t str_len)
2999 MSVCP_size_t inside_pos = -1;
3000 wchar_t *ptr = this->ptr;
3002 TRACE("%p %ld %ld %p %ld\n", this, off, len, str, str_len);
3004 if(this->size < off)
3005 _Xran();
3007 if(len > this->size-off)
3008 len = this->size-off;
3010 if(MSVCP_basic_string_wchar_npos-str_len <= this->size-len)
3011 _Xlen();
3013 if(basic_string_wchar_inside(this, str))
3014 inside_pos = str-ptr;
3016 if(this->size-len+str_len)
3017 basic_string_wchar__Grow(this, this->size-len+str_len, FALSE);
3018 ptr = this->ptr;
3020 if(inside_pos == -1) {
3021 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3022 memcpy(ptr+off, str, str_len*sizeof(char));
3023 } else if(len >= str_len) {
3024 memmove(ptr+off, ptr+inside_pos, str_len*sizeof(char));
3025 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3026 } else {
3027 MSVCP_size_t size;
3029 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3031 if(inside_pos < off+len) {
3032 size = off+len-inside_pos;
3033 if(size > str_len)
3034 size = str_len;
3035 memmove(ptr+off, ptr+inside_pos, size*sizeof(char));
3036 } else {
3037 size = 0;
3040 if(str_len > size)
3041 memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(char));
3044 if(this->ptr)
3045 basic_string_wchar__Eos(this, this->size-len+str_len);
3046 return this;
3049 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@II@Z */
3050 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0AEBV12@00@Z */
3051 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_substr, 24)
3052 basic_string_wchar* __thiscall basic_string_wchar_replace_substr(basic_string_wchar *this, MSVCP_size_t off,
3053 MSVCP_size_t len, const basic_string_wchar *str, MSVCP_size_t str_off, MSVCP_size_t str_len)
3055 if(str->size < str_off)
3056 _Xran();
3058 if(str_len > str->size-str_off)
3059 str_len = str->size-str_off;
3061 return basic_string_wchar_replace_cstr_len(this, off, len,
3062 str->ptr+str_off, str_len);
3065 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@@Z */
3066 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0AEBV12@@Z */
3067 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace, 16)
3068 basic_string_wchar* __thiscall basic_string_wchar_replace(basic_string_wchar *this,
3069 MSVCP_size_t off, MSVCP_size_t len, const basic_string_wchar *str)
3071 return basic_string_wchar_replace_cstr_len(this, off, len,
3072 str->ptr, str->size);
3075 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIIG@Z */
3076 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K00G@Z */
3077 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_ch, 20)
3078 basic_string_wchar* __thiscall basic_string_wchar_replace_ch(basic_string_wchar *this,
3079 MSVCP_size_t off, MSVCP_size_t len, MSVCP_size_t count, wchar_t ch)
3081 wchar_t *ptr;
3083 TRACE("%p %ld %ld %ld %c\n", this, off, len, count, ch);
3085 if(this->size < off)
3086 _Xran();
3088 if(len > this->size-off)
3089 len = this->size-off;
3091 if(MSVCP_basic_string_wchar_npos-count <= this->size-len)
3092 _Xlen();
3094 if(this->size-len+count)
3095 basic_string_wchar__Grow(this, this->size-len+count, FALSE);
3096 ptr = this->ptr;
3098 memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(char));
3099 MSVCP_char_traits_wchar_assignn(ptr+off, count, ch);
3100 basic_string_wchar__Eos(this, this->size-len+count);
3102 return this;
3105 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIPBG@Z */
3106 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG@Z */
3107 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_cstr, 16)
3108 basic_string_wchar* __thiscall basic_string_wchar_replace_cstr(basic_string_wchar *this,
3109 MSVCP_size_t off, MSVCP_size_t len, const wchar_t *str)
3111 return basic_string_wchar_replace_cstr_len(this, off, len, str,
3112 MSVCP_char_traits_wchar_length(str));
3115 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IABV12@@Z */
3116 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KAEBV12@@Z */
3117 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert, 12)
3118 basic_string_wchar* __thiscall basic_string_wchar_insert(basic_string_wchar *this,
3119 MSVCP_size_t off, const basic_string_wchar *str)
3121 return basic_string_wchar_replace(this, off, 0, str);
3124 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IABV12@II@Z */
3125 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KAEBV12@00@Z */
3126 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_substr, 20)
3127 basic_string_wchar* __thiscall basic_string_wchar_insert_substr(
3128 basic_string_wchar *this, MSVCP_size_t off, const basic_string_wchar *str,
3129 MSVCP_size_t str_off, MSVCP_size_t str_count)
3131 return basic_string_wchar_replace_substr(this, off, 0, str, str_off, str_count);
3134 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IPBG@Z */
3135 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KPEBG@Z */
3136 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_cstr, 12)
3137 basic_string_wchar* __thiscall basic_string_wchar_insert_cstr(
3138 basic_string_wchar *this, MSVCP_size_t off, const wchar_t *str)
3140 return basic_string_wchar_replace_cstr(this, off, 0, str);
3143 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IPBGI@Z */
3144 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KPEBG0@Z */
3145 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_cstr_len, 16)
3146 basic_string_wchar* __thiscall basic_string_wchar_insert_cstr_len(basic_string_wchar *this,
3147 MSVCP_size_t off, const wchar_t *str, MSVCP_size_t str_len)
3149 return basic_string_wchar_replace_cstr_len(this, off, 0, str, str_len);
3152 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIG@Z */
3153 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0G@Z */
3154 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_chn, 16)
3155 basic_string_wchar* __thiscall basic_string_wchar_insert_chn(basic_string_wchar *this,
3156 MSVCP_size_t off, MSVCP_size_t count, wchar_t ch)
3158 return basic_string_wchar_replace_ch(this, off, 0, count, ch);
3161 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXIG@Z */
3162 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_KG@Z */
3163 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_resize_ch, 12)
3164 void __thiscall MSVCP_basic_string_wchar_resize_ch(
3165 basic_string_wchar *this, MSVCP_size_t size, wchar_t ch)
3167 TRACE("%p %lu %c\n", this, size, ch);
3169 if(size <= this->size)
3170 MSVCP_basic_string_wchar_erase(this, size, this->size);
3171 else
3172 MSVCP_basic_string_wchar_append_len_ch(this, size-this->size, ch);
3175 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXI@Z */
3176 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_K@Z */
3177 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_resize, 8)
3178 void __thiscall MSVCP_basic_string_wchar_resize(
3179 basic_string_wchar *this, MSVCP_size_t size)
3181 MSVCP_basic_string_wchar_resize_ch(this, size, '\0');
3184 /* ?c_str@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3185 /* ?c_str@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3186 /* ?data@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3187 /* ?data@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3188 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_c_str, 4)
3189 const wchar_t* __thiscall MSVCP_basic_string_wchar_c_str(const basic_string_wchar *this)
3191 TRACE("%p\n", this);
3192 return this->ptr ? this->ptr : basic_string_wchar__Nullstr();
3195 /* ?size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3196 /* ?size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3197 /* ?length@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3198 /* ?length@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3199 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_length, 4)
3200 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_length(const basic_string_wchar *this)
3202 TRACE("%p\n", this);
3203 return this->size;
3206 /* ?max_size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3207 /* ?max_size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3208 DEFINE_THISCALL_WRAPPER(basic_string_wchar_max_size, 4)
3209 MSVCP_size_t __thiscall basic_string_wchar_max_size(const basic_string_wchar *this)
3211 TRACE("%p\n", this);
3212 return MSVCP_allocator_wchar_max_size(NULL)-1;
3215 /* ?capacity@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3216 /* ?capacity@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3217 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_capacity, 4)
3218 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_capacity(basic_string_wchar *this)
3220 TRACE("%p\n", this);
3221 return this->res;
3224 /* ?reserve@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXI@Z */
3225 /* ?reserve@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_K@Z */
3226 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_reserve, 8)
3227 void __thiscall MSVCP_basic_string_wchar_reserve(basic_string_wchar *this, MSVCP_size_t size)
3229 MSVCP_size_t len;
3231 TRACE("%p %ld\n", this, size);
3233 len = this->size;
3234 if(len > size)
3235 return;
3237 if(basic_string_wchar__Grow(this, size, FALSE))
3238 basic_string_wchar__Eos(this, len);
3241 /* ?empty@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE_NXZ */
3242 /* ?empty@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_NXZ */
3243 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_empty, 4)
3244 MSVCP_bool __thiscall MSVCP_basic_string_wchar_empty(basic_string_wchar *this)
3246 TRACE("%p\n", this);
3247 return this->size == 0;
3250 /* ?swap@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXAAV12@@Z */
3251 /* ?swap@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXAEAV12@@Z */
3252 DEFINE_THISCALL_WRAPPER(basic_string_wchar_swap, 8)
3253 void __thiscall basic_string_wchar_swap(basic_string_wchar *this, basic_string_wchar *str)
3255 basic_string_wchar tmp;
3256 TRACE("%p %p\n", this, str);
3258 tmp = *this;
3259 *this = *str;
3260 *str = tmp;
3263 /* ?substr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV12@II@Z */
3264 /* ?substr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV12@_K0@Z */
3265 DEFINE_THISCALL_WRAPPER(basic_string_wchar_substr, 16)
3266 basic_string_wchar* __thiscall basic_string_wchar_substr(basic_string_wchar *this,
3267 basic_string_wchar *ret, MSVCP_size_t off, MSVCP_size_t len)
3269 TRACE("%p %lu %lu\n", this, off, len);
3271 MSVCP_basic_string_wchar_ctor_substr_alloc(ret, this, off, len, NULL);
3272 return ret;
3275 /* ?copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPAGII@Z */
3276 /* ?copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEAG_K1@Z */
3277 DEFINE_THISCALL_WRAPPER(basic_string_wchar_copy, 16)
3278 MSVCP_size_t __thiscall basic_string_wchar_copy(const basic_string_wchar *this,
3279 wchar_t *dest, MSVCP_size_t count, MSVCP_size_t off)
3281 TRACE("%p %p %lu %lu\n", this, dest, count, off);
3283 if(off > this->size)
3284 _Xran();
3285 if(count > this->size-off)
3286 count = this->size-off;
3287 if(this->ptr)
3288 MSVCP_char_traits_wchar__Copy_s(dest, count, this->ptr+off, count);
3289 return count;
3292 /* ?get_allocator@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$allocator@G@2@XZ */
3293 /* ?get_allocator@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$allocator@G@2@XZ */
3294 DEFINE_THISCALL_WRAPPER(basic_string_wchar_get_allocator, 8)
3295 allocator* __thiscall basic_string_wchar_get_allocator(const basic_string_wchar *this, allocator *ret)
3297 TRACE("%p\n", this);
3298 return ret;
3301 /* Old iterator functions */
3303 /* ?_Pdif@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAIPBD0@Z */
3304 /* ?_Pdif@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CA_KPEBD0@Z */
3305 MSVCP_size_t __cdecl basic_string_char__Pdif(const char *i1, const char *i2)
3307 TRACE("(%p %p)\n", i1, i2);
3308 return !i1 ? 0 : i1-i2;
3311 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPAD0@Z */
3312 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEAD0@Z */
3313 DEFINE_THISCALL_WRAPPER(basic_string_char_erase_iter, 12)
3314 char* __thiscall basic_string_char_erase_iter(basic_string_char *this, char *beg, char *end)
3316 MSVCP_size_t pos = basic_string_char__Pdif(beg, this->ptr);
3317 MSVCP_basic_string_char_erase(this, pos, basic_string_char__Pdif(end, beg));
3318 return basic_string_char__Psum(this->ptr, pos);
3321 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBD1@Z */
3322 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD1@Z */
3323 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_iter, 20)
3324 basic_string_char* __thiscall basic_string_char_replace_iter_iter(basic_string_char *this,
3325 char *beg1, char *end1, const char *beg2, const char *end2)
3327 return basic_string_char_replace_cstr_len(this, basic_string_char__Pdif(beg1, this->ptr),
3328 basic_string_char__Pdif(end1, beg1), beg2, basic_string_char__Pdif(end2, beg2));
3331 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0ABV12@@Z */
3332 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0AEBV12@@Z */
3333 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_bstr, 16)
3334 basic_string_char* __thiscall basic_string_char_replace_iter_bstr(basic_string_char *this,
3335 char *beg, char *end, const basic_string_char *str)
3337 return basic_string_char_replace(this, basic_string_char__Pdif(beg, this->ptr),
3338 basic_string_char__Pdif(end, beg), str);
3341 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0ID@Z */
3342 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0_KD@Z */
3343 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_chn, 20)
3344 basic_string_char* __thiscall basic_string_char_replace_iter_chn(basic_string_char *this,
3345 char *beg, char *end, MSVCP_size_t count, char ch)
3347 return basic_string_char_replace_ch(this, basic_string_char__Pdif(beg, this->ptr),
3348 basic_string_char__Pdif(end, beg), count, ch);
3351 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBD@Z */
3352 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD@Z */
3353 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr, 16)
3354 basic_string_char* __thiscall basic_string_char_replace_iter_cstr(basic_string_char *this,
3355 char *beg, char *end, const char *str)
3357 return basic_string_char_replace_cstr(this, basic_string_char__Pdif(beg, this->ptr),
3358 basic_string_char__Pdif(end, beg), str);
3361 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBDI@Z */
3362 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD_K@Z */
3363 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr_len, 20)
3364 basic_string_char* __thiscall basic_string_char_replace_iter_cstr_len(basic_string_char *this,
3365 char *beg, char *end, const char *str, MSVCP_size_t len)
3367 return basic_string_char_replace_cstr_len(this, basic_string_char__Pdif(beg, this->ptr),
3368 basic_string_char__Pdif(end, beg), str, len);
3371 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXPADID@Z */
3372 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXPEAD_KD@Z */
3373 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter_chn, 16)
3374 void __thiscall basic_string_char_insert_iter_chn(basic_string_char *this,
3375 char *pos, MSVCP_size_t n, char ch)
3377 basic_string_char_insert_chn(this, basic_string_char__Pdif(pos, this->ptr), n, ch);
3380 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPADD@Z */
3381 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEADD@Z */
3382 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter_ch, 12)
3383 char* __thiscall basic_string_char_insert_iter_ch(basic_string_char *this, char *pos, char ch)
3385 MSVCP_size_t off = basic_string_char__Pdif(pos, this->ptr);
3386 basic_string_char_insert_chn(this, off, 1, ch);
3387 return basic_string_char__Psum(this->ptr, off);
3390 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADXZ */
3391 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADXZ */
3392 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
3393 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
3394 DEFINE_THISCALL_WRAPPER(basic_string_char_begin, 4)
3395 char* __thiscall basic_string_char_begin(basic_string_char *this)
3397 TRACE("(%p)\n", this);
3398 basic_string_char__Freeze(this);
3399 return this->ptr;
3402 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADXZ */
3403 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADXZ */
3404 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
3405 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
3406 DEFINE_THISCALL_WRAPPER(basic_string_char_end, 4)
3407 char* __thiscall basic_string_char_end(basic_string_char *this)
3409 TRACE("(%p)\n", this);
3410 basic_string_char__Freeze(this);
3411 return this->ptr+this->size;
3414 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@PADDAADPADH@2@XZ */
3415 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@PEADDAEADPEAD_J@2@XZ */
3416 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@PBDDABDPBDH@2@XZ */
3417 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@PEBDDAEBDPEBD_J@2@XZ */
3418 DEFINE_THISCALL_WRAPPER(basic_string_char_rbegin, 8)
3419 String_reverse_iterator_char* __thiscall basic_string_char_rbegin(
3420 basic_string_char *this, String_reverse_iterator_char *ret)
3422 TRACE("(%p %p)\n", this, ret);
3423 ret->ptr = basic_string_char_end(this);
3424 return ret;
3427 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@PADDAADPADH@2@XZ */
3428 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@PEADDAEADPEAD_J@2@XZ */
3429 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@PBDDABDPBDH@2@XZ */
3430 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@PEBDDAEBDPEBD_J@2@XZ */
3431 DEFINE_THISCALL_WRAPPER(basic_string_char_rend, 8)
3432 String_reverse_iterator_char* __thiscall basic_string_char_rend(
3433 basic_string_char *this, String_reverse_iterator_char *ret)
3435 TRACE("(%p %p)\n", this, ret);
3436 ret->ptr = basic_string_char_begin(this);
3437 return ret;
3440 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD0ABV?$allocator@D@1@@Z */
3441 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD0AEBV?$allocator@D@1@@Z */
3442 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_iter, 16)
3443 basic_string_char* __thiscall basic_string_char_ctor_iter(basic_string_char *this,
3444 const char *first, const char *last, allocator *alloc)
3446 TRACE("(%p %p %p %p)\n", this, first, last, alloc);
3448 basic_string_char__Tidy(this, FALSE);
3449 MSVCP_basic_string_char_assign_cstr_len(this, first, basic_string_char__Pdif(last, first));
3450 return this;
3453 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXPADPBD1@Z */
3454 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXPEADPEBD1@Z */
3455 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter, 16)
3456 void __thiscall basic_string_char_insert_iter(basic_string_char *this,
3457 char *pos, const char *beg, const char *end)
3459 basic_string_char_insert_cstr_len(this, basic_string_char__Pdif(pos, this->ptr),
3460 beg, basic_string_char__Pdif(end, beg));
3463 /* ?_Pdif@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAIPBG0@Z */
3464 /* ?_Pdif@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CA_KPEBG0@Z */
3465 MSVCP_size_t __cdecl basic_string_wchar__Pdif(const wchar_t *i1, const wchar_t *i2)
3467 TRACE("(%p %p)\n", i1, i2);
3468 return !i1 ? 0 : i1-i2;
3471 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAG0@Z */
3472 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAG0@Z */
3473 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase_iter, 12)
3474 wchar_t* __thiscall basic_string_wchar_erase_iter(basic_string_wchar *this, wchar_t *beg, wchar_t *end)
3476 MSVCP_size_t pos = basic_string_wchar__Pdif(beg, this->ptr);
3477 MSVCP_basic_string_wchar_erase(this, pos, basic_string_wchar__Pdif(end, beg));
3478 return basic_string_wchar__Psum(this->ptr, pos);
3481 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBG0ABV?$allocator@G@1@@Z */
3482 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG0AEBV?$allocator@G@1@@Z */
3483 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_iter, 16)
3484 basic_string_wchar* __thiscall basic_string_wchar_ctor_iter(basic_string_wchar *this,
3485 const wchar_t *first, const wchar_t *last, allocator *alloc)
3487 TRACE("(%p %p %p %p)\n", this, first, last, alloc);
3489 basic_string_wchar__Tidy(this, FALSE);
3490 MSVCP_basic_string_wchar_assign_cstr_len(this, first, basic_string_wchar__Pdif(last, first));
3491 return this;
3494 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBG1@Z */
3495 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG1@Z */
3496 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_iter, 20)
3497 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_iter(basic_string_wchar *this,
3498 wchar_t *beg1, wchar_t *end1, const wchar_t *beg2, const wchar_t *end2)
3500 return basic_string_wchar_replace_cstr_len(this, basic_string_wchar__Pdif(beg1, this->ptr),
3501 basic_string_wchar__Pdif(end1, beg1), beg2, basic_string_wchar__Pdif(end2, beg2));
3504 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0ABV12@@Z */
3505 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0AEBV12@@Z */
3506 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_bstr, 16)
3507 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_bstr(basic_string_wchar *this,
3508 wchar_t *beg, wchar_t *end, const basic_string_wchar *str)
3510 return basic_string_wchar_replace(this, basic_string_wchar__Pdif(beg, this->ptr),
3511 basic_string_wchar__Pdif(end, beg), str);
3514 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0IG@Z */
3515 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0_KG@Z */
3516 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_chn, 20)
3517 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_chn(basic_string_wchar *this,
3518 wchar_t *beg, wchar_t *end, MSVCP_size_t count, wchar_t ch)
3520 return basic_string_wchar_replace_ch(this, basic_string_wchar__Pdif(beg, this->ptr),
3521 basic_string_wchar__Pdif(end, beg), count, ch);
3524 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBG@Z */
3525 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG@Z */
3526 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr, 16)
3527 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr(basic_string_wchar *this,
3528 wchar_t *beg, wchar_t *end, const wchar_t *str)
3530 return basic_string_wchar_replace_cstr(this, basic_string_wchar__Pdif(beg, this->ptr),
3531 basic_string_wchar__Pdif(end, beg), str);
3534 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBGI@Z */
3535 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG_K@Z */
3536 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr_len, 20)
3537 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr_len(basic_string_wchar *this,
3538 wchar_t *beg, wchar_t *end, const wchar_t *str, MSVCP_size_t len)
3540 return basic_string_wchar_replace_cstr_len(this, basic_string_wchar__Pdif(beg, this->ptr),
3541 basic_string_wchar__Pdif(end, beg), str, len);
3544 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXPAGIG@Z */
3545 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXPEAG_KG@Z */
3546 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter_chn, 16)
3547 void __thiscall basic_string_wchar_insert_iter_chn(basic_string_wchar *this,
3548 wchar_t *pos, MSVCP_size_t n, wchar_t ch)
3550 basic_string_wchar_insert_chn(this, basic_string_wchar__Pdif(pos, this->ptr), n, ch);
3553 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAGG@Z */
3554 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAGG@Z */
3555 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter_ch, 12)
3556 wchar_t* __thiscall basic_string_wchar_insert_iter_ch(basic_string_wchar *this, wchar_t *pos, wchar_t ch)
3558 MSVCP_size_t off = basic_string_wchar__Pdif(pos, this->ptr);
3559 basic_string_wchar_insert_chn(this, off, 1, ch);
3560 return basic_string_wchar__Psum(this->ptr, off);
3563 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGXZ */
3564 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGXZ */
3565 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3566 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3567 DEFINE_THISCALL_WRAPPER(basic_string_wchar_begin, 4)
3568 wchar_t* __thiscall basic_string_wchar_begin(basic_string_wchar *this)
3570 TRACE("(%p)\n", this);
3571 basic_string_wchar__Freeze(this);
3572 return this->ptr;
3575 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGXZ */
3576 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGXZ */
3577 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3578 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3579 DEFINE_THISCALL_WRAPPER(basic_string_wchar_end, 4)
3580 wchar_t* __thiscall basic_string_wchar_end(basic_string_wchar *this)
3582 TRACE("(%p)\n", this);
3583 basic_string_wchar__Freeze(this);
3584 return this->ptr+this->size;
3587 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@PAGGAAGPAGH@2@XZ */
3588 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@PEAGGAEAGPEAG_J@2@XZ */
3589 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@PBGGABGPBGH@2@XZ */
3590 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@PEBGGAEBGPEBG_J@2@XZ */
3591 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rbegin, 8)
3592 String_reverse_iterator_wchar* __thiscall basic_string_wchar_rbegin(
3593 basic_string_wchar *this, String_reverse_iterator_wchar *ret)
3595 TRACE("(%p %p)\n", this, ret);
3596 ret->ptr = basic_string_wchar_end(this);
3597 return ret;
3600 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@PAGGAAGPAGH@2@XZ */
3601 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@PEAGGAEAGPEAG_J@2@XZ */
3602 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@PBGGABGPBGH@2@XZ */
3603 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@PEBGGAEBGPEBG_J@2@XZ */
3604 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rend, 8)
3605 String_reverse_iterator_wchar* __thiscall basic_string_wchar_rend(
3606 basic_string_wchar *this, String_reverse_iterator_wchar *ret)
3608 TRACE("(%p %p)\n", this, ret);
3609 ret->ptr = basic_string_wchar_begin(this);
3610 return ret;
3613 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXPAGPBG1@Z */
3614 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXPEAGPEBG1@Z */
3615 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter, 16)
3616 void __thiscall basic_string_wchar_insert_iter(basic_string_wchar *this,
3617 wchar_t *pos, const wchar_t *beg, const wchar_t *end)
3619 basic_string_wchar_insert_cstr_len(this, basic_string_wchar__Pdif(pos, this->ptr),
3620 beg, basic_string_wchar__Pdif(end, beg));