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
29 #include "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(msvcp);
34 /* _String_iterator<char> and _String_const_iterator<char> class */
37 } String_reverse_iterator_char;
41 } String_reverse_iterator_wchar;
48 /* ?_Xran@std@@YAXXZ */
49 void __cdecl _Xran(void)
51 static const char msg[] = "invalid string position";
54 throw_exception(EXCEPTION_OUT_OF_RANGE, msg);
57 /* ?_Xlen@std@@YAXXZ */
58 void __cdecl _Xlen(void)
60 static const char msg[] = "string too long";
63 throw_exception(EXCEPTION_LENGTH_ERROR, msg);
66 static char* char_traits_char__Move_s(char *dest,
67 MSVCP_size_t size, const char *src, MSVCP_size_t count)
69 if(!dest || !src || size<count) {
72 _invalid_parameter(NULL, NULL, NULL, 0, 0);
76 return memmove(dest, src, count);
79 static char* char_traits_char__Copy_s(char *dest,
80 MSVCP_size_t size, const char *src, MSVCP_size_t count)
82 if(!dest || !src || size<count) {
85 _invalid_parameter(NULL, NULL, NULL, 0, 0);
89 return memcpy(dest, src, count);
92 static MSVCP_size_t char_traits_char_length(const char *str)
97 static char* char_traits_char_assignn(char *str, MSVCP_size_t num, char c)
99 return memset(str, c, num);
102 static int char_traits_char_compare(const char *s1,
103 const char *s2, MSVCP_size_t count)
105 int ret = memcmp(s1, s2, count);
106 return (ret>0 ? 1 : (ret<0 ? -1 : 0));
109 static const char* char_traits_char_find(const char *str,
110 MSVCP_size_t range, const char *c)
112 return memchr(str, *c, range);
115 static MSVCP_bool basic_string_char_inside(
116 basic_string_char *this, const char *ptr)
118 return ptr>=this->ptr && ptr<this->ptr+this->size;
121 /* ?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2IB */
122 /* ?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2_KB */
123 const MSVCP_size_t basic_string_char_npos = -1;
125 /* ?_C@?1??_Nullstr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPBDXZ@4DB */
126 /* ?_C@?1??_Nullstr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEBDXZ@4DB */
127 const char basic_string_char_nullbyte = '\0';
129 /* ?_Nullstr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPBDXZ */
130 /* ?_Nullstr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEBDXZ */
131 const char* __cdecl basic_string_char__Nullstr(void)
133 return &basic_string_char_nullbyte;
136 /* ?_Refcnt@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEAAEPBD@Z */
137 /* ?_Refcnt@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAAEAEPEBD@Z */
138 DEFINE_THISCALL_WRAPPER(basic_string_char__Refcnt, 8)
139 unsigned char* __thiscall basic_string_char__Refcnt(basic_string_char *this, const char *ptr)
141 TRACE("(%p %p)\n", this, ptr);
142 return (unsigned char*)ptr-1;
145 /* ?_Eos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXI@Z */
146 /* ?_Eos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAX_K@Z */
147 DEFINE_THISCALL_WRAPPER(basic_string_char__Eos, 8)
148 void __thiscall basic_string_char__Eos(basic_string_char *this, MSVCP_size_t len)
154 void basic_string_char_clear(basic_string_char *this)
156 basic_string_char__Eos(this, 0);
159 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEX_N@Z */
160 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAX_N@Z */
161 DEFINE_THISCALL_WRAPPER(basic_string_char__Tidy, 8)
162 void __thiscall basic_string_char__Tidy(basic_string_char *this, MSVCP_bool built)
164 TRACE("(%p %d)\n", this, built);
166 if(!this->ptr || !built);
167 else if(!this->ptr[-1] || (unsigned char)this->ptr[-1]==FROZEN)
168 MSVCP_allocator_char_deallocate(NULL, this->ptr, this->res+2);
172 memset(this, 0, sizeof(*this));
175 /* ?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAE_NI_N@Z */
176 /* ?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAA_N_K_N@Z */
177 DEFINE_THISCALL_WRAPPER(basic_string_char__Grow, 12)
178 MSVCP_bool __thiscall basic_string_char__Grow(basic_string_char *this, MSVCP_size_t new_size, MSVCP_bool trim)
182 basic_string_char__Tidy(this, TRUE);
184 basic_string_char__Eos(this, 0);
185 } else if(this->res<new_size || trim ||
186 (this->ptr && this->ptr[-1] && (unsigned char)this->ptr[-1]!=FROZEN)) {
187 MSVCP_size_t new_res = new_size, len = this->size;
190 if(!trim && this->ptr && !this->ptr[-1]) {
192 if(new_res/3 < this->res/2)
193 new_res = this->res + this->res/2;
196 ptr = MSVCP_allocator_char_allocate(this->allocator, new_res+2);
199 ptr = MSVCP_allocator_char_allocate(this->allocator, new_size+2);
202 ERR("Out of memory\n");
211 char_traits_char__Copy_s(ptr+1, new_size, this->ptr, len);
212 basic_string_char__Tidy(this, TRUE);
215 basic_string_char__Eos(this, len);
221 /* ?_Split@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXXZ */
222 /* ?_Split@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAXXZ */
223 DEFINE_THISCALL_WRAPPER(basic_string_char__Split, 4)
224 void __thiscall basic_string_char__Split(basic_string_char *this)
229 TRACE("(%p)\n", this);
231 if(!this->ptr || !this->ptr[-1] || (unsigned char)this->ptr[-1]==FROZEN)
236 basic_string_char__Tidy(this, TRUE);
237 if(basic_string_char__Grow(this, len, FALSE)) {
238 char_traits_char__Copy_s(this->ptr, this->res, ptr, len);
239 basic_string_char__Eos(this, len);
243 /* ?_Freeze@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXXZ */
244 /* ?_Freeze@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAXXZ */
245 DEFINE_THISCALL_WRAPPER(basic_string_char__Freeze, 4)
246 void __thiscall basic_string_char__Freeze(basic_string_char *this)
248 TRACE("(%p)\n", this);
249 basic_string_char__Split(this);
251 this->ptr[-1] = FROZEN;
254 /* ?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXI@Z */
255 /* ?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAX_K@Z */
256 DEFINE_THISCALL_WRAPPER(basic_string_char__Copy, 8)
257 void __thiscall basic_string_char__Copy(basic_string_char *this, MSVCP_size_t copy_len)
259 TRACE("%p %lu\n", this, copy_len);
261 if(!basic_string_char__Grow(this, copy_len, FALSE))
263 basic_string_char__Eos(this, copy_len);
266 /* ?_Pdif@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAIPBD0@Z */
267 /* ?_Pdif@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CA_KPEBD0@Z */
268 MSVCP_size_t __cdecl basic_string_char__Pdif(const char *i1, const char *i2)
270 TRACE("(%p %p)\n", i1, i2);
271 return !i1 ? 0 : i1-i2;
274 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPADPADI@Z */
275 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEADPEAD_K@Z */
276 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPBDPBDI@Z */
277 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEBDPEBD_K@Z */
278 char* __cdecl basic_string_char__Psum(char *iter, MSVCP_size_t add)
280 TRACE("(%p %lu)\n", iter, add);
281 return iter ? iter+add : iter;
284 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z */
285 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0@Z */
286 DEFINE_THISCALL_WRAPPER(basic_string_char_erase, 12)
287 basic_string_char* __thiscall basic_string_char_erase(
288 basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t len)
290 TRACE("%p %lu %lu\n", this, pos, len);
295 if(len > this->size-pos)
296 len = this->size-pos;
299 basic_string_char__Split(this);
300 char_traits_char__Move_s(this->ptr+pos, this->res-pos,
301 this->ptr+pos+len, this->size-pos-len);
302 basic_string_char__Eos(this, this->size-len);
308 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPAD0@Z */
309 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEAD0@Z */
310 DEFINE_THISCALL_WRAPPER(basic_string_char_erase_iter, 12)
311 char* __thiscall basic_string_char_erase_iter(basic_string_char *this, char *beg, char *end)
313 MSVCP_size_t pos = basic_string_char__Pdif(beg, this->ptr);
314 basic_string_char_erase(this, pos, basic_string_char__Pdif(end, beg));
315 return basic_string_char__Psum(this->ptr, pos);
318 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPAD@Z */
319 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEAD@Z */
320 DEFINE_THISCALL_WRAPPER(basic_string_char_erase_beg, 8)
321 char* __thiscall basic_string_char_erase_beg(basic_string_char *this, char *beg)
323 MSVCP_size_t pos = beg-this->ptr;
324 basic_string_char_erase(this, pos, 1);
325 return this->ptr+pos;
328 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */
329 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
330 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_substr, 16)
331 basic_string_char* __thiscall basic_string_char_assign_substr(
332 basic_string_char *this, const basic_string_char *assign,
333 MSVCP_size_t pos, MSVCP_size_t len)
335 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
337 if(assign->size < pos)
340 if(len > assign->size-pos)
341 len = assign->size-pos;
344 basic_string_char_erase(this, pos+len, basic_string_char_npos);
345 basic_string_char_erase(this, 0, pos);
346 } else if(basic_string_char__Grow(this, len, FALSE)) {
347 char_traits_char__Copy_s(this->ptr, this->res,
348 assign->ptr+pos, len);
349 basic_string_char__Eos(this, len);
355 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z */
356 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z */
357 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_cstr_len, 12)
358 basic_string_char* __thiscall basic_string_char_assign_cstr_len(
359 basic_string_char *this, const char *str, MSVCP_size_t len)
361 TRACE("%p %s %lu\n", this, debugstr_an(str, len), len);
363 if(basic_string_char_inside(this, str))
364 return basic_string_char_assign_substr(this, this, str-this->ptr, len);
365 else if(basic_string_char__Grow(this, len, FALSE)) {
366 char_traits_char__Copy_s(this->ptr, this->res, str, len);
367 basic_string_char__Eos(this, len);
373 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */
374 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */
375 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z */
376 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@AEBV01@@Z */
377 DEFINE_THISCALL_WRAPPER(basic_string_char_assign, 8)
378 basic_string_char* __thiscall basic_string_char_assign(
379 basic_string_char *this, const basic_string_char *assign)
381 return basic_string_char_assign_substr(this, assign,
382 0, basic_string_char_npos);
385 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z */
386 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD@Z */
387 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z */
388 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@PEBD@Z */
389 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_cstr, 8)
390 basic_string_char* __thiscall basic_string_char_assign_cstr(
391 basic_string_char *this, const char *str)
393 return basic_string_char_assign_cstr_len(this, str,
394 char_traits_char_length(str));
397 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@D@Z */
398 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@D@Z */
399 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_ch, 8)
400 basic_string_char* __thiscall basic_string_char_assign_ch(
401 basic_string_char *this, char ch)
403 return basic_string_char_assign_cstr_len(this, &ch, 1);
406 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */
407 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KD@Z */
408 DEFINE_THISCALL_WRAPPER(basic_string_char_assignn, 12)
409 basic_string_char* __thiscall basic_string_char_assignn(
410 basic_string_char *this, MSVCP_size_t count, char ch)
412 TRACE("%p %ld %c\n", this, count, ch);
414 basic_string_char__Grow(this, count, FALSE);
415 char_traits_char_assignn(this->ptr, count, ch);
416 basic_string_char__Eos(this, count);
420 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD0@Z */
421 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD0@Z */
422 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_ptr_ptr, 12)
423 basic_string_char* __thiscall basic_string_char_assign_ptr_ptr(
424 basic_string_char *this, const char *first, const char *last)
426 return basic_string_char_assign_cstr_len(this, first, last-first);
429 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDIABV?$allocator@D@1@@Z */
430 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD_KAEBV?$allocator@D@1@@Z */
431 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_cstr_len_alloc, 16)
432 basic_string_char* __thiscall basic_string_char_ctor_cstr_len_alloc(
433 basic_string_char *this, const char *str, MSVCP_size_t len, const void *alloc)
435 TRACE("%p %s %ld\n", this, debugstr_an(str, len), len);
437 basic_string_char__Tidy(this, FALSE);
438 basic_string_char_assign_cstr_len(this, str, len);
442 basic_string_char* basic_string_char_ctor_cstr_len(basic_string_char *this, const char *str, MSVCP_size_t len)
444 return basic_string_char_ctor_cstr_len_alloc(this, str, len, NULL);
447 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@IIABV?$allocator@D@1@@Z */
448 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@_K1AEBV?$allocator@D@1@@Z */
449 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_substr_alloc, 20)
450 basic_string_char* __thiscall basic_string_char_ctor_substr_alloc(
451 basic_string_char *this, const basic_string_char *assign,
452 MSVCP_size_t pos, MSVCP_size_t len, const void *alloc)
454 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
456 basic_string_char__Tidy(this, FALSE);
457 basic_string_char_assign_substr(this, assign, pos, len);
461 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDABV?$allocator@D@1@@Z */
462 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBDAEBV?$allocator@D@1@@Z */
463 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_cstr_alloc, 12)
464 basic_string_char* __thiscall basic_string_char_ctor_cstr_alloc(
465 basic_string_char *this, const char *str, const void *alloc)
467 TRACE("%p %s\n", this, debugstr_a(str));
469 basic_string_char__Tidy(this, FALSE);
470 basic_string_char_assign_cstr(this, str);
474 basic_string_char* basic_string_char_ctor_cstr(
475 basic_string_char *this, const char *str)
477 return basic_string_char_ctor_cstr_alloc(this, str, NULL);
480 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@IDABV?$allocator@D@1@@Z */
481 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@_KDAEBV?$allocator@D@1@@Z */
482 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_ch_alloc, 16)
483 basic_string_char* __thiscall basic_string_char_ctor_ch_alloc(basic_string_char *this,
484 MSVCP_size_t count, char ch, const void *alloc)
486 TRACE("%p %ld %c\n", this, count, ch);
488 basic_string_char__Tidy(this, FALSE);
489 basic_string_char_assignn(this, count, ch);
493 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD0ABV?$allocator@D@1@@Z */
494 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD0AEBV?$allocator@D@1@@Z */
495 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_iter, 16)
496 basic_string_char* __thiscall basic_string_char_ctor_iter(basic_string_char *this,
497 const char *first, const char *last, allocator *alloc)
499 TRACE("(%p %p %p %p)\n", this, first, last, alloc);
501 basic_string_char__Tidy(this, FALSE);
502 basic_string_char_assign_cstr_len(this, first, basic_string_char__Pdif(last, first));
506 /* ??_F?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
507 /* ??_F?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
508 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor, 4)
509 basic_string_char* __thiscall basic_string_char_ctor(basic_string_char *this)
513 basic_string_char__Tidy(this, FALSE);
517 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$allocator@D@1@@Z */
518 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV?$allocator@D@1@@Z */
519 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_alloc, 8)
520 basic_string_char* __thiscall basic_string_char_ctor_alloc(
521 basic_string_char *this, const void *alloc)
523 TRACE("%p %p\n", this, alloc);
525 basic_string_char__Tidy(this, FALSE);
529 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z */
530 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@@Z */
531 DEFINE_THISCALL_WRAPPER(basic_string_char_copy_ctor, 8)
532 basic_string_char* __thiscall basic_string_char_copy_ctor(
533 basic_string_char *this, const basic_string_char *copy)
535 TRACE("%p %p\n", this, copy);
537 basic_string_char__Tidy(this, FALSE);
538 basic_string_char_assign(this, copy);
542 /* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ */
543 /* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@XZ */
544 DEFINE_THISCALL_WRAPPER(basic_string_char_dtor, 4)
545 void __thiscall basic_string_char_dtor(basic_string_char *this)
548 basic_string_char__Tidy(this, TRUE);
551 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIPBDI@Z */
552 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0PEBD0@Z */
553 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_substr_cstr_len, 20)
554 int __thiscall basic_string_char_compare_substr_cstr_len(
555 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
556 const char *str, MSVCP_size_t count)
560 TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_an(str, count), count);
565 if(num > this->size-pos)
566 num = this->size-pos;
568 ans = char_traits_char_compare(this->ptr+pos,
569 str, num>count ? count : num);
580 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHPBD@Z */
581 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAHPEBD@Z */
582 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_cstr, 8)
583 int __thiscall basic_string_char_compare_cstr(
584 const basic_string_char *this, const char *str)
586 return basic_string_char_compare_substr_cstr_len(this, 0, this->size,
587 str, char_traits_char_length(str));
590 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIABV12@II@Z */
591 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0AEBV12@00@Z */
592 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_substr_substr, 24)
593 int __thiscall basic_string_char_compare_substr_substr(
594 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
595 const basic_string_char *compare, MSVCP_size_t off, MSVCP_size_t count)
597 TRACE("%p %lu %lu %p %lu %lu\n", this, pos, num, compare, off, count);
599 if(compare->size < off)
602 if(count > compare->size-off)
603 count = compare->size-off;
605 return basic_string_char_compare_substr_cstr_len(this, pos, num,
606 compare->ptr+off, count);
609 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIABV12@@Z */
610 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0AEBV12@@Z */
611 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_substr, 16)
612 int __thiscall basic_string_char_compare_substr(
613 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
614 const basic_string_char *compare)
616 return basic_string_char_compare_substr_cstr_len(this, pos, num,
617 compare->ptr, compare->size);
620 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHABV12@@Z */
621 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAHAEBV12@@Z */
622 DEFINE_THISCALL_WRAPPER(basic_string_char_compare, 8)
623 int __thiscall basic_string_char_compare(
624 const basic_string_char *this, const basic_string_char *compare)
626 return basic_string_char_compare_substr_cstr_len(this, 0, this->size,
627 compare->ptr, compare->size);
630 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIPBD@Z */
631 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0PEBD@Z */
632 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_substr_cstr, 16)
633 int __thiscall basic_string_char_compare_substr_cstr(const basic_string_char *this,
634 MSVCP_size_t pos, MSVCP_size_t num, const char *str)
636 return basic_string_char_compare_substr_cstr_len(this, pos, num,
637 str, char_traits_char_length(str));
640 /* ??$?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 */
641 /* ??$?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 */
642 /* ??8std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
643 /* ??8std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
644 MSVCP_bool __cdecl basic_string_char_equal(
645 const basic_string_char *left, const basic_string_char *right)
647 return basic_string_char_compare(left, right) == 0;
650 /* ??$?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 */
651 /* ??$?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 */
652 /* ??8std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
653 /* ??8std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
654 MSVCP_bool __cdecl basic_string_char_equal_str_cstr(
655 const basic_string_char *left, const char *right)
657 return basic_string_char_compare_cstr(left, right) == 0;
660 /* ??$?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 */
661 /* ??$?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 */
662 /* ??8std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
663 /* ??8std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
664 MSVCP_bool __cdecl basic_string_char_equal_cstr_str(
665 const char *left, const basic_string_char *right)
667 return basic_string_char_compare_cstr(right, left) == 0;
670 /* ??$?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 */
671 /* ??$?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 */
672 /* ??9std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
673 /* ??9std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
674 MSVCP_bool __cdecl basic_string_char_not_equal(
675 const basic_string_char *left, const basic_string_char *right)
677 return basic_string_char_compare(left, right) != 0;
680 /* ??$?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 */
681 /* ??$?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 */
682 /* ??9std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
683 /* ??9std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
684 MSVCP_bool __cdecl basic_string_char_not_equal_str_cstr(
685 const basic_string_char *left, const char *right)
687 return basic_string_char_compare_cstr(left, right) != 0;
690 /* ??$?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 */
691 /* ??$?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 */
692 /* ??9std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
693 /* ??9std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
694 MSVCP_bool __cdecl basic_string_char_not_equal_cstr_str(
695 const char *left, const basic_string_char *right)
697 return basic_string_char_compare_cstr(right, left) != 0;
700 /* ??$?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 */
701 /* ??$?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 */
702 /* ??Mstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
703 /* ??Mstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
704 MSVCP_bool __cdecl basic_string_char_lower(
705 const basic_string_char *left, const basic_string_char *right)
707 return basic_string_char_compare(left, right) < 0;
710 /* ??$?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 */
711 /* ??$?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 */
712 /* ??Mstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
713 /* ??Mstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
714 MSVCP_bool __cdecl basic_string_char_lower_bstr_cstr(
715 const basic_string_char *left, const char *right)
717 return basic_string_char_compare_cstr(left, right) < 0;
720 /* ??$?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 */
721 /* ??$?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 */
722 /* ??Mstd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
723 /* ??Mstd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
724 MSVCP_bool __cdecl basic_string_char_lower_cstr_bstr(
725 const char *left, const basic_string_char *right)
727 return basic_string_char_compare_cstr(right, left) > 0;
730 /* ??$?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 */
731 /* ??$?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 */
732 /* ??Nstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
733 /* ??Nstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
734 MSVCP_bool __cdecl basic_string_char_leq(
735 const basic_string_char *left, const basic_string_char *right)
737 return basic_string_char_compare(left, right) <= 0;
740 /* ??$?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 */
741 /* ??$?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 */
742 /* ??Nstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
743 /* ??Nstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
744 MSVCP_bool __cdecl basic_string_char_leq_bstr_cstr(
745 const basic_string_char *left, const char *right)
747 return basic_string_char_compare_cstr(left, right) <= 0;
750 /* ??$?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 */
751 /* ??$?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 */
752 /* ??Nstd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
753 /* ??Nstd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
754 MSVCP_bool __cdecl basic_string_char_leq_cstr_bstr(
755 const char *left, const basic_string_char *right)
757 return basic_string_char_compare_cstr(right, left) >= 0;
760 /* ??$?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 */
761 /* ??$?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 */
762 /* ??Ostd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
763 /* ??Ostd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
764 MSVCP_bool __cdecl basic_string_char_greater(
765 const basic_string_char *left, const basic_string_char *right)
767 return basic_string_char_compare(left, right) > 0;
770 /* ??$?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 */
771 /* ??$?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 */
772 /* ??Ostd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
773 /* ??Ostd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
774 MSVCP_bool __cdecl basic_string_char_greater_bstr_cstr(
775 const basic_string_char *left, const char *right)
777 return basic_string_char_compare_cstr(left, right) > 0;
780 /* ??$?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 */
781 /* ??$?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 */
782 /* ??Ostd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
783 /* ??Ostd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
784 MSVCP_bool __cdecl basic_string_char_greater_cstr_bstr(
785 const char *left, const basic_string_char *right)
787 return basic_string_char_compare_cstr(right, left) < 0;
790 /* ??$?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 */
791 /* ??$?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 */
792 /* ??Pstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
793 /* ??Pstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
794 MSVCP_bool __cdecl basic_string_char_geq(
795 const basic_string_char *left, const basic_string_char *right)
797 return basic_string_char_compare(left, right) >= 0;
800 /* ??$?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 */
801 /* ??$?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 */
802 /* ??Pstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
803 /* ??Pstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
804 MSVCP_bool __cdecl basic_string_char_geq_bstr_cstr(
805 const basic_string_char *left, const char *right)
807 return basic_string_char_compare_cstr(left, right) >= 0;
810 /* ??$?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 */
811 /* ??$?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 */
812 /* ??Pstd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
813 /* ??Pstd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
814 MSVCP_bool __cdecl basic_string_char_geq_cstr_bstr(
815 const char *left, const basic_string_char *right)
817 return basic_string_char_compare_cstr(right, left) <= 0;
820 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
821 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
822 DEFINE_THISCALL_WRAPPER(basic_string_char_find_cstr_substr, 16)
823 MSVCP_size_t __thiscall basic_string_char_find_cstr_substr(
824 const basic_string_char *this, const char *find, MSVCP_size_t pos, MSVCP_size_t len)
828 TRACE("%p %s %lu %lu\n", this, debugstr_an(find, len), pos, len);
830 if(len==0 && pos<=this->size)
832 if(pos>=this->size || len>this->size)
833 return basic_string_char_npos;
835 end = this->ptr+this->size-len+1;
836 for(p=this->ptr+pos; p<end; p++) {
837 p = char_traits_char_find(p, end-p, find);
841 if(!char_traits_char_compare(p, find, len))
845 return basic_string_char_npos;
848 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
849 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
850 DEFINE_THISCALL_WRAPPER(basic_string_char_find_off, 12)
851 MSVCP_size_t __thiscall basic_string_char_find_off(
852 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
854 return basic_string_char_find_cstr_substr(this, find->ptr, off, find->size);
857 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
858 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
859 DEFINE_THISCALL_WRAPPER(basic_string_char_find_ch, 12)
860 MSVCP_size_t __thiscall basic_string_char_find_ch(
861 const basic_string_char *this, char ch, MSVCP_size_t pos)
863 return basic_string_char_find_cstr_substr(this, &ch, pos, 1);
866 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
867 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
868 DEFINE_THISCALL_WRAPPER(basic_string_char_find_cstr_off, 12)
869 MSVCP_size_t __thiscall basic_string_char_find_cstr_off(
870 const basic_string_char *this, const char *find, MSVCP_size_t pos)
872 return basic_string_char_find_cstr_substr(this, find, pos,
873 char_traits_char_length(find));
876 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
877 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
878 DEFINE_THISCALL_WRAPPER(basic_string_char_rfind_cstr_substr, 16)
879 MSVCP_size_t __thiscall basic_string_char_rfind_cstr_substr(
880 const basic_string_char *this, const char *find, MSVCP_size_t pos, MSVCP_size_t len)
884 TRACE("%p %s %lu %lu\n", this, debugstr_an(find, len), pos, len);
887 return pos<this->size ? pos : this->size;
890 return basic_string_char_npos;
892 if(pos > this->size-len+1)
893 pos = this->size-len+1;
895 for(p=end+pos-1; p>=end; p--) {
896 if(*p==*find && !char_traits_char_compare(p, find, len))
900 return basic_string_char_npos;
903 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
904 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
905 DEFINE_THISCALL_WRAPPER(basic_string_char_rfind_off, 12)
906 MSVCP_size_t __thiscall basic_string_char_rfind_off(
907 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
909 return basic_string_char_rfind_cstr_substr(this, find->ptr, off, find->size);
912 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
913 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
914 DEFINE_THISCALL_WRAPPER(basic_string_char_rfind_ch, 12)
915 MSVCP_size_t __thiscall basic_string_char_rfind_ch(
916 const basic_string_char *this, char ch, MSVCP_size_t pos)
918 return basic_string_char_rfind_cstr_substr(this, &ch, pos, 1);
921 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
922 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
923 DEFINE_THISCALL_WRAPPER(basic_string_char_rfind_cstr_off, 12)
924 MSVCP_size_t __thiscall basic_string_char_rfind_cstr_off(
925 const basic_string_char *this, const char *find, MSVCP_size_t pos)
927 return basic_string_char_rfind_cstr_substr(this, find, pos,
928 char_traits_char_length(find));
931 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
932 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
933 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_not_of_cstr_substr, 16)
934 MSVCP_size_t __thiscall basic_string_char_find_first_not_of_cstr_substr(
935 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
939 TRACE("%p %p %lu %lu\n", this, find, off, len);
942 end = this->ptr+this->size;
943 for(p=this->ptr+off; p<end; p++)
944 if(!char_traits_char_find(find, len, p))
948 return basic_string_char_npos;
951 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
952 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
953 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_not_of, 12)
954 MSVCP_size_t __thiscall basic_string_char_find_first_not_of(
955 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
957 return basic_string_char_find_first_not_of_cstr_substr(this,
958 find->ptr, off, find->size);
961 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
962 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
963 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_not_of_ch, 12)
964 MSVCP_size_t __thiscall basic_string_char_find_first_not_of_ch(
965 const basic_string_char *this, char ch, MSVCP_size_t off)
967 return basic_string_char_find_first_not_of_cstr_substr(this, &ch, off, 1);
970 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
971 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
972 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_not_of_cstr, 12)
973 MSVCP_size_t __thiscall basic_string_char_find_first_not_of_cstr(
974 const basic_string_char *this, const char *find, MSVCP_size_t off)
976 return basic_string_char_find_first_not_of_cstr_substr(
977 this, find, off, char_traits_char_length(find));
980 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
981 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
982 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_of_cstr_substr, 16)
983 MSVCP_size_t __thiscall basic_string_char_find_first_of_cstr_substr(
984 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
988 TRACE("%p %p %lu %lu\n", this, find, off, len);
990 if(len>0 && off<this->size) {
991 end = this->ptr+this->size;
992 for(p=this->ptr+off; p<end; p++)
993 if(char_traits_char_find(find, len, p))
997 return basic_string_char_npos;
1000 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1001 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1002 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_of, 12)
1003 MSVCP_size_t __thiscall basic_string_char_find_first_of(
1004 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1006 return basic_string_char_find_first_of_cstr_substr(this,
1007 find->ptr, off, find->size);
1010 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1011 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1012 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_of_ch, 12)
1013 MSVCP_size_t __thiscall basic_string_char_find_first_of_ch(
1014 const basic_string_char *this, char ch, MSVCP_size_t off)
1016 return basic_string_char_find_first_of_cstr_substr(this, &ch, off, 1);
1019 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1020 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1021 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_of_cstr, 12)
1022 MSVCP_size_t __thiscall basic_string_char_find_first_of_cstr(
1023 const basic_string_char *this, const char *find, MSVCP_size_t off)
1025 return basic_string_char_find_first_of_cstr_substr(
1026 this, find, off, char_traits_char_length(find));
1029 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1030 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1031 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_not_of_cstr_substr, 16)
1032 MSVCP_size_t __thiscall basic_string_char_find_last_not_of_cstr_substr(
1033 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
1035 const char *p, *beg;
1037 TRACE("%p %p %lu %lu\n", this, find, off, len);
1039 if(len>0 && this->size>0) {
1040 if(off >= this->size)
1044 for(p=beg+off; p>=beg; p--)
1045 if(!char_traits_char_find(find, len, p))
1049 return basic_string_char_npos;
1052 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1053 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1054 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_not_of, 12)
1055 MSVCP_size_t __thiscall basic_string_char_find_last_not_of(
1056 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1058 return basic_string_char_find_last_not_of_cstr_substr(this,
1059 find->ptr, off, find->size);
1062 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1063 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1064 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_not_of_ch, 12)
1065 MSVCP_size_t __thiscall basic_string_char_find_last_not_of_ch(
1066 const basic_string_char *this, char ch, MSVCP_size_t off)
1068 return basic_string_char_find_last_not_of_cstr_substr(this, &ch, off, 1);
1071 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1072 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1073 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_not_of_cstr, 12)
1074 MSVCP_size_t __thiscall basic_string_char_find_last_not_of_cstr(
1075 const basic_string_char *this, const char *find, MSVCP_size_t off)
1077 return basic_string_char_find_last_not_of_cstr_substr(
1078 this, find, off, char_traits_char_length(find));
1081 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1082 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1083 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_of_cstr_substr, 16)
1084 MSVCP_size_t __thiscall basic_string_char_find_last_of_cstr_substr(
1085 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
1087 const char *p, *beg;
1089 TRACE("%p %p %lu %lu\n", this, find, off, len);
1091 if(len>0 && this->size>0) {
1092 if(off >= this->size)
1096 for(p=beg+off; p>=beg; p--)
1097 if(char_traits_char_find(find, len, p))
1101 return basic_string_char_npos;
1104 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1105 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1106 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_of, 12)
1107 MSVCP_size_t __thiscall basic_string_char_find_last_of(
1108 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1110 return basic_string_char_find_last_of_cstr_substr(this,
1111 find->ptr, off, find->size);
1114 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1115 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1116 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_of_ch, 12)
1117 MSVCP_size_t __thiscall basic_string_char_find_last_of_ch(
1118 const basic_string_char *this, char ch, MSVCP_size_t off)
1120 return basic_string_char_find_last_of_cstr_substr(this, &ch, off, 1);
1123 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1124 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1125 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_of_cstr, 12)
1126 MSVCP_size_t __thiscall basic_string_char_find_last_of_cstr(
1127 const basic_string_char *this, const char *find, MSVCP_size_t off)
1129 return basic_string_char_find_last_of_cstr_substr(
1130 this, find, off, char_traits_char_length(find));
1133 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */
1134 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
1135 DEFINE_THISCALL_WRAPPER(basic_string_char_append_substr, 16)
1136 basic_string_char* __thiscall basic_string_char_append_substr(basic_string_char *this,
1137 const basic_string_char *append, MSVCP_size_t offset, MSVCP_size_t count)
1139 TRACE("%p %p %lu %lu\n", this, append, offset, count);
1141 if(append->size < offset)
1144 if(count > append->size-offset)
1145 count = append->size-offset;
1147 if(basic_string_char_npos-this->size<=count || this->size+count<this->size)
1150 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1151 char_traits_char__Copy_s(this->ptr+this->size,
1152 this->res-this->size, append->ptr+offset, count);
1153 basic_string_char__Eos(this, this->size+count);
1159 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z */
1160 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z */
1161 DEFINE_THISCALL_WRAPPER(basic_string_char_append_cstr_len, 12)
1162 basic_string_char* __thiscall basic_string_char_append_cstr_len(
1163 basic_string_char *this, const char *append, MSVCP_size_t count)
1165 TRACE("%p %s %lu\n", this, debugstr_an(append, count), count);
1167 if(basic_string_char_inside(this, append))
1168 return basic_string_char_append_substr(this, this, append-this->ptr, count);
1170 if(basic_string_char_npos-this->size<=count || this->size+count<this->size)
1173 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1174 char_traits_char__Copy_s(this->ptr+this->size,
1175 this->res-this->size, append, count);
1176 basic_string_char__Eos(this, this->size+count);
1182 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */
1183 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KD@Z */
1184 DEFINE_THISCALL_WRAPPER(basic_string_char_append_len_ch, 12)
1185 basic_string_char* __thiscall basic_string_char_append_len_ch(
1186 basic_string_char *this, MSVCP_size_t count, char ch)
1188 TRACE("%p %lu %c\n", this, count, ch);
1190 if(basic_string_char_npos-this->size <= count)
1193 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1194 char_traits_char_assignn(this->ptr+this->size, count, ch);
1195 basic_string_char__Eos(this, this->size+count);
1201 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */
1202 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */
1203 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z */
1204 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@AEBV01@@Z */
1205 DEFINE_THISCALL_WRAPPER(basic_string_char_append, 8)
1206 basic_string_char* __thiscall basic_string_char_append(
1207 basic_string_char *this, const basic_string_char *append)
1209 return basic_string_char_append_substr(this, append,
1210 0, basic_string_char_npos);
1213 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@D@Z */
1214 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@D@Z */
1215 DEFINE_THISCALL_WRAPPER(basic_string_char_append_ch, 8)
1216 basic_string_char* __thiscall basic_string_char_append_ch(
1217 basic_string_char *this, char ch)
1219 return basic_string_char_append_len_ch(this, 1, ch);
1222 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD0@Z */
1223 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD0@Z */
1224 DEFINE_THISCALL_WRAPPER(basic_string_char_append_beg_end, 12)
1225 basic_string_char* __thiscall basic_string_char_append_beg_end(
1226 basic_string_char *this, const char *beg, const char *end)
1228 return basic_string_char_append_cstr_len(this, beg, end-beg);
1231 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z */
1232 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD@Z */
1233 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z */
1234 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@PEBD@Z */
1235 DEFINE_THISCALL_WRAPPER(basic_string_char_append_cstr, 8)
1236 basic_string_char* __thiscall basic_string_char_append_cstr(
1237 basic_string_char *this, const char *append)
1239 return basic_string_char_append_cstr_len(this, append,
1240 char_traits_char_length(append));
1242 /* ??$?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 */
1243 /* ??$?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 */
1244 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z */
1245 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@0@Z */
1246 basic_string_char* __cdecl basic_string_char_concatenate(basic_string_char *ret,
1247 const basic_string_char *left, const basic_string_char *right)
1249 TRACE("%p %p\n", left, right);
1251 basic_string_char_copy_ctor(ret, left);
1252 basic_string_char_append(ret, right);
1256 /* ??$?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 */
1257 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@D@Z */
1258 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@D@Z */
1259 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@D@Z */
1260 basic_string_char* __cdecl basic_string_char_concatenate_bstr_ch(basic_string_char *ret,
1261 const basic_string_char *left, char right)
1263 TRACE("%p %c\n", left, right);
1265 basic_string_char_copy_ctor(ret, left);
1266 basic_string_char_append_ch(ret, right);
1270 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z */
1271 /* ??$?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 */
1272 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z */
1273 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@PEBD@Z */
1274 basic_string_char* __cdecl basic_string_char_concatenate_bstr_cstr(basic_string_char *ret,
1275 const basic_string_char *left, const char *right)
1277 TRACE("%p %s\n", left, debugstr_a(right));
1279 basic_string_char_copy_ctor(ret, left);
1280 basic_string_char_append_cstr(ret, right);
1284 /* ??$?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 */
1285 /* ??$?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 */
1286 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DABV10@@Z */
1287 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DAEBV10@@Z */
1288 basic_string_char* __cdecl basic_string_char_concatenate_ch_bstr(basic_string_char *ret,
1289 char left, const basic_string_char *right)
1291 TRACE("%c %p\n", left, right);
1293 basic_string_char_ctor_cstr_len_alloc(ret, &left, 1, NULL);
1294 basic_string_char_append(ret, right);
1298 /* ??$?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 */
1299 /* ??$?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 */
1300 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z */
1301 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBDAEBV10@@Z */
1302 basic_string_char* __cdecl basic_string_char_concatenate_cstr_bstr(basic_string_char *ret,
1303 const char *left, const basic_string_char *right)
1305 TRACE("%s %p\n", debugstr_a(left), right);
1307 basic_string_char_ctor_cstr_alloc(ret, left, NULL);
1308 basic_string_char_append(ret, right);
1312 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */
1313 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */
1314 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */
1315 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */
1316 DEFINE_THISCALL_WRAPPER(basic_string_char_operator_at, 8)
1317 char* __thiscall basic_string_char_operator_at(
1318 basic_string_char *this, MSVCP_size_t pos)
1320 TRACE("%p %lu\n", this, pos);
1322 assert(this->size >= pos);
1323 return this->ptr+pos;
1326 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */
1327 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */
1328 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */
1329 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */
1330 DEFINE_THISCALL_WRAPPER(basic_string_char_at, 8)
1331 char* __thiscall basic_string_char_at(
1332 basic_string_char *this, MSVCP_size_t pos)
1334 TRACE("%p %lu\n", this, pos);
1336 if(this->size <= pos)
1339 return this->ptr+pos;
1342 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBDI@Z */
1343 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD0@Z */
1344 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_cstr_len, 20)
1345 basic_string_char* __thiscall basic_string_char_replace_cstr_len(basic_string_char *this,
1346 MSVCP_size_t off, MSVCP_size_t len, const char *str, MSVCP_size_t str_len)
1348 MSVCP_size_t inside_pos = -1;
1349 char *ptr = this->ptr;
1351 TRACE("%p %ld %ld %p %ld\n", this, off, len, str, str_len);
1353 if(this->size < off)
1356 if(len > this->size-off)
1357 len = this->size-off;
1359 if(basic_string_char_npos-str_len <= this->size-len)
1362 if(basic_string_char_inside(this, str))
1363 inside_pos = str-ptr;
1365 if(this->size-len+str_len)
1366 basic_string_char__Grow(this, this->size-len+str_len, FALSE);
1369 if(inside_pos == -1) {
1370 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1371 memcpy(ptr+off, str, str_len*sizeof(char));
1372 } else if(len >= str_len) {
1373 memmove(ptr+off, ptr+inside_pos, str_len*sizeof(char));
1374 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1378 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1380 if(inside_pos < off+len) {
1381 size = off+len-inside_pos;
1384 memmove(ptr+off, ptr+inside_pos, size*sizeof(char));
1390 memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(char));
1393 basic_string_char__Eos(this, this->size-len+str_len);
1397 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@II@Z */
1398 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0AEBV12@00@Z */
1399 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_substr, 24)
1400 basic_string_char* __thiscall basic_string_char_replace_substr(basic_string_char *this, MSVCP_size_t off,
1401 MSVCP_size_t len, const basic_string_char *str, MSVCP_size_t str_off, MSVCP_size_t str_len)
1403 if(str->size < str_off)
1406 if(str_len > str->size-str_off)
1407 str_len = str->size-str_off;
1409 return basic_string_char_replace_cstr_len(this, off, len,
1410 str->ptr+str_off, str_len);
1413 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@@Z */
1414 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0AEBV12@@Z */
1415 DEFINE_THISCALL_WRAPPER(basic_string_char_replace, 16)
1416 basic_string_char* __thiscall basic_string_char_replace(basic_string_char *this,
1417 MSVCP_size_t off, MSVCP_size_t len, const basic_string_char *str)
1419 return basic_string_char_replace_cstr_len(this, off, len,
1420 str->ptr, str->size);
1423 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIID@Z */
1424 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K00D@Z */
1425 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_ch, 20)
1426 basic_string_char* __thiscall basic_string_char_replace_ch(basic_string_char *this,
1427 MSVCP_size_t off, MSVCP_size_t len, MSVCP_size_t count, char ch)
1431 TRACE("%p %ld %ld %ld %c\n", this, off, len, count, ch);
1433 if(this->size < off)
1436 if(len > this->size-off)
1437 len = this->size-off;
1439 if(basic_string_char_npos-count <= this->size-len)
1442 if(this->size-len+count)
1443 basic_string_char__Grow(this, this->size-len+count, FALSE);
1446 memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(char));
1447 char_traits_char_assignn(ptr+off, count, ch);
1448 basic_string_char__Eos(this, this->size-len+count);
1453 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBD@Z */
1454 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD@Z */
1455 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_cstr, 16)
1456 basic_string_char* __thiscall basic_string_char_replace_cstr(basic_string_char *this,
1457 MSVCP_size_t off, MSVCP_size_t len, const char *str)
1459 return basic_string_char_replace_cstr_len(this, off, len, str,
1460 char_traits_char_length(str));
1463 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0ABV12@@Z */
1464 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0AEBV12@@Z */
1465 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_bstr, 16)
1466 basic_string_char* __thiscall basic_string_char_replace_iter_bstr(basic_string_char *this,
1467 char *beg, char *end, const basic_string_char *str)
1469 return basic_string_char_replace(this, basic_string_char__Pdif(beg, this->ptr),
1470 basic_string_char__Pdif(end, beg), str);
1473 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0ID@Z */
1474 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0_KD@Z */
1475 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_chn, 20)
1476 basic_string_char* __thiscall basic_string_char_replace_iter_chn(basic_string_char *this,
1477 char *beg, char *end, MSVCP_size_t count, char ch)
1479 return basic_string_char_replace_ch(this, basic_string_char__Pdif(beg, this->ptr),
1480 basic_string_char__Pdif(end, beg), count, ch);
1483 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBD1@Z */
1484 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD1@Z */
1485 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_iter, 20)
1486 basic_string_char* __thiscall basic_string_char_replace_iter_iter(basic_string_char *this,
1487 char *beg1, char *end1, const char *beg2, const char *end2)
1489 return basic_string_char_replace_cstr_len(this, basic_string_char__Pdif(beg1, this->ptr),
1490 basic_string_char__Pdif(end1, beg1), beg2, basic_string_char__Pdif(end2, beg2));
1493 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBD@Z */
1494 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD@Z */
1495 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr, 16)
1496 basic_string_char* __thiscall basic_string_char_replace_iter_cstr(basic_string_char *this,
1497 char *beg, char *end, const char *str)
1499 return basic_string_char_replace_cstr(this, basic_string_char__Pdif(beg, this->ptr),
1500 basic_string_char__Pdif(end, beg), str);
1503 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBDI@Z */
1504 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD_K@Z */
1505 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr_len, 20)
1506 basic_string_char* __thiscall basic_string_char_replace_iter_cstr_len(basic_string_char *this,
1507 char *beg, char *end, const char *str, MSVCP_size_t len)
1509 return basic_string_char_replace_cstr_len(this, basic_string_char__Pdif(beg, this->ptr),
1510 basic_string_char__Pdif(end, beg), str, len);
1513 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IABV12@@Z */
1514 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KAEBV12@@Z */
1515 DEFINE_THISCALL_WRAPPER(basic_string_char_insert, 12)
1516 basic_string_char* __thiscall basic_string_char_insert(basic_string_char *this,
1517 MSVCP_size_t off, const basic_string_char *str)
1519 return basic_string_char_replace(this, off, 0, str);
1522 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IABV12@II@Z */
1523 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KAEBV12@00@Z */
1524 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_substr, 20)
1525 basic_string_char* __thiscall basic_string_char_insert_substr(
1526 basic_string_char *this, MSVCP_size_t off, const basic_string_char *str,
1527 MSVCP_size_t str_off, MSVCP_size_t str_count)
1529 return basic_string_char_replace_substr(this, off, 0, str, str_off, str_count);
1532 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IPBD@Z */
1533 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KPEBD@Z */
1534 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_cstr, 12)
1535 basic_string_char* __thiscall basic_string_char_insert_cstr(
1536 basic_string_char *this, MSVCP_size_t off, const char *str)
1538 return basic_string_char_replace_cstr(this, off, 0, str);
1541 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IPBDI@Z */
1542 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KPEBD0@Z */
1543 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_cstr_len, 16)
1544 basic_string_char* __thiscall basic_string_char_insert_cstr_len(basic_string_char *this,
1545 MSVCP_size_t off, const char *str, MSVCP_size_t str_len)
1547 return basic_string_char_replace_cstr_len(this, off, 0, str, str_len);
1550 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IID@Z */
1551 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0D@Z */
1552 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_chn, 16)
1553 basic_string_char* __thiscall basic_string_char_insert_chn(basic_string_char *this,
1554 MSVCP_size_t off, MSVCP_size_t count, char ch)
1556 return basic_string_char_replace_ch(this, off, 0, count, ch);
1559 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPADD@Z */
1560 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEADD@Z */
1561 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter_ch, 12)
1562 char* __thiscall basic_string_char_insert_iter_ch(basic_string_char *this, char *pos, char ch)
1564 MSVCP_size_t off = basic_string_char__Pdif(pos, this->ptr);
1565 basic_string_char_insert_chn(this, off, 1, ch);
1566 return basic_string_char__Psum(this->ptr, off);
1569 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXPADID@Z */
1570 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXPEAD_KD@Z */
1571 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter_chn, 16)
1572 void __thiscall basic_string_char_insert_iter_chn(basic_string_char *this,
1573 char *pos, MSVCP_size_t n, char ch)
1575 basic_string_char_insert_chn(this, basic_string_char__Pdif(pos, this->ptr), n, ch);
1578 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXPADPBD1@Z */
1579 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXPEADPEBD1@Z */
1580 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter, 16)
1581 void __thiscall basic_string_char_insert_iter(basic_string_char *this,
1582 char *pos, const char *beg, const char *end)
1584 basic_string_char_insert_cstr_len(this, basic_string_char__Pdif(pos, this->ptr),
1585 beg, basic_string_char__Pdif(end, beg));
1588 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXID@Z */
1589 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_KD@Z */
1590 DEFINE_THISCALL_WRAPPER(basic_string_char_resize_ch, 12)
1591 void __thiscall basic_string_char_resize_ch(
1592 basic_string_char *this, MSVCP_size_t size, char ch)
1594 TRACE("%p %lu %c\n", this, size, ch);
1596 if(size <= this->size)
1597 basic_string_char_erase(this, size, this->size);
1599 basic_string_char_append_len_ch(this, size-this->size, ch);
1602 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z */
1603 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z */
1604 DEFINE_THISCALL_WRAPPER(basic_string_char_resize, 8)
1605 void __thiscall basic_string_char_resize(
1606 basic_string_char *this, MSVCP_size_t size)
1608 basic_string_char_resize_ch(this, size, '\0');
1611 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADXZ */
1612 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADXZ */
1613 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1614 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1615 DEFINE_THISCALL_WRAPPER(basic_string_char_begin, 4)
1616 char* __thiscall basic_string_char_begin(basic_string_char *this)
1618 TRACE("(%p)\n", this);
1619 basic_string_char__Freeze(this);
1623 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADXZ */
1624 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADXZ */
1625 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1626 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1627 DEFINE_THISCALL_WRAPPER(basic_string_char_end, 4)
1628 char* __thiscall basic_string_char_end(basic_string_char *this)
1630 TRACE("(%p)\n", this);
1631 basic_string_char__Freeze(this);
1632 return this->ptr+this->size;
1635 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@PADDAADPADH@2@XZ */
1636 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@PEADDAEADPEAD_J@2@XZ */
1637 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@PBDDABDPBDH@2@XZ */
1638 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@PEBDDAEBDPEBD_J@2@XZ */
1639 DEFINE_THISCALL_WRAPPER(basic_string_char_rbegin, 8)
1640 String_reverse_iterator_char* __thiscall basic_string_char_rbegin(
1641 basic_string_char *this, String_reverse_iterator_char *ret)
1643 TRACE("(%p %p)\n", this, ret);
1644 ret->ptr = basic_string_char_end(this);
1648 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@PADDAADPADH@2@XZ */
1649 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@PEADDAEADPEAD_J@2@XZ */
1650 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@PBDDABDPBDH@2@XZ */
1651 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@PEBDDAEBDPEBD_J@2@XZ */
1652 DEFINE_THISCALL_WRAPPER(basic_string_char_rend, 8)
1653 String_reverse_iterator_char* __thiscall basic_string_char_rend(
1654 basic_string_char *this, String_reverse_iterator_char *ret)
1656 TRACE("(%p %p)\n", this, ret);
1657 ret->ptr = basic_string_char_begin(this);
1661 /* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1662 /* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1663 /* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1664 /* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1665 DEFINE_THISCALL_WRAPPER(basic_string_char_c_str, 4)
1666 const char* __thiscall basic_string_char_c_str(const basic_string_char *this)
1668 TRACE("%p\n", this);
1672 /* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1673 /* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1674 /* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1675 /* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1676 DEFINE_THISCALL_WRAPPER(basic_string_char_length, 4)
1677 MSVCP_size_t __thiscall basic_string_char_length(const basic_string_char *this)
1679 TRACE("%p\n", this);
1683 /* ?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1684 /* ?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1685 DEFINE_THISCALL_WRAPPER(basic_string_char_max_size, 4)
1686 MSVCP_size_t __thiscall basic_string_char_max_size(const basic_string_char *this)
1688 TRACE("%p\n", this);
1689 return MSVCP_allocator_char_max_size(NULL)-1;
1692 /* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1693 /* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1694 DEFINE_THISCALL_WRAPPER(basic_string_char_capacity, 4)
1695 MSVCP_size_t __thiscall basic_string_char_capacity(basic_string_char *this)
1697 TRACE("%p\n", this);
1701 /* ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z */
1702 /* ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z */
1703 DEFINE_THISCALL_WRAPPER(basic_string_char_reserve, 8)
1704 void __thiscall basic_string_char_reserve(basic_string_char *this, MSVCP_size_t size)
1708 TRACE("%p %ld\n", this, size);
1714 basic_string_char__Grow(this, size, FALSE);
1715 basic_string_char__Eos(this, len);
1718 /* ?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE_NXZ */
1719 /* ?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_NXZ */
1720 DEFINE_THISCALL_WRAPPER(basic_string_char_empty, 4)
1721 MSVCP_bool __thiscall basic_string_char_empty(basic_string_char *this)
1723 TRACE("%p\n", this);
1724 return this->size == 0;
1727 /* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXAAV12@@Z */
1728 /* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEAV12@@Z */
1729 DEFINE_THISCALL_WRAPPER(basic_string_char_swap, 8)
1730 void __thiscall basic_string_char_swap(basic_string_char *this, basic_string_char *str)
1732 basic_string_char tmp;
1733 TRACE("%p %p\n", this, str);
1740 /* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV12@II@Z */
1741 /* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV12@_K0@Z */
1742 DEFINE_THISCALL_WRAPPER(basic_string_char_substr, 16)
1743 basic_string_char* __thiscall basic_string_char_substr(basic_string_char *this,
1744 basic_string_char *ret, MSVCP_size_t off, MSVCP_size_t len)
1746 TRACE("%p %lu %lu\n", this, off, len);
1748 basic_string_char_ctor_substr_alloc(ret, this, off, len, NULL);
1752 /* ?copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPADII@Z */
1753 /* ?copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEAD_K1@Z */
1754 DEFINE_THISCALL_WRAPPER(basic_string_char_copy, 16)
1755 MSVCP_size_t __thiscall basic_string_char_copy(const basic_string_char *this,
1756 char *dest, MSVCP_size_t count, MSVCP_size_t off)
1758 TRACE("%p %p %lu %lu\n", this, dest, count, off);
1760 if(off > this->size)
1762 if(count > this->size-off)
1763 count = this->size-off;
1764 char_traits_char__Copy_s(dest, count, this->ptr+off, count);
1768 /* ?get_allocator@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$allocator@D@2@XZ */
1769 /* ?get_allocator@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$allocator@D@2@XZ */
1770 DEFINE_THISCALL_WRAPPER(basic_string_char_get_allocator, 8)
1771 allocator* __thiscall basic_string_char_get_allocator(const basic_string_char *this, allocator *ret)
1773 TRACE("%p\n", this);
1777 static wchar_t* char_traits_wchar__Move_s(wchar_t *dest,
1778 MSVCP_size_t size, const wchar_t *src, MSVCP_size_t count)
1780 if(!dest || !src || size<count) {
1783 _invalid_parameter(NULL, NULL, NULL, 0, 0);
1787 return memmove(dest, src, count);
1790 static wchar_t* char_traits_wchar__Copy_s(wchar_t *dest,
1791 MSVCP_size_t size, const wchar_t *src, MSVCP_size_t count)
1793 if(!dest || !src || size<count) {
1796 _invalid_parameter(NULL, NULL, NULL, 0, 0);
1800 return memcpy(dest, src, count);
1803 static MSVCP_size_t char_traits_wchar_length(const wchar_t *str)
1805 return wcslen((WCHAR*)str);
1808 static wchar_t* char_traits_wchar_assignn(wchar_t *str, MSVCP_size_t num, wchar_t c)
1810 return memset(str, c, num);
1813 static int char_traits_wchar_compare(const wchar_t *s1,
1814 const wchar_t *s2, MSVCP_size_t count)
1816 int ret = memcmp(s1, s2, count);
1817 return (ret>0 ? 1 : (ret<0 ? -1 : 0));
1820 static const wchar_t* char_traits_wchar_find(const wchar_t *str,
1821 MSVCP_size_t range, const wchar_t *c)
1823 return memchr(str, *c, range);
1826 static MSVCP_bool basic_string_wchar_inside(
1827 basic_string_wchar *this, const wchar_t *ptr)
1829 return ptr>=this->ptr && ptr<this->ptr+this->size;
1832 /* ?npos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@2IB */
1833 /* ?npos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@2_KB */
1834 const MSVCP_size_t basic_string_wchar_npos = -1;
1836 /* ?_C@?1??_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGXZ@4GB */
1837 /* ?_C@?1??_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGXZ@4GB */
1838 const wchar_t basic_string_wchar_nullbyte = '\0';
1840 /* ?_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGXZ */
1841 /* ?_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGXZ */
1842 const wchar_t* __cdecl basic_string_wchar__Nullstr(void)
1844 return &basic_string_wchar_nullbyte;
1847 /* ?_Refcnt@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEAAEPBG@Z */
1848 /* ?_Refcnt@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAAEAEPEBG@Z */
1849 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Refcnt, 8)
1850 unsigned short* __thiscall basic_string_wchar__Refcnt(basic_string_wchar *this, const wchar_t *ptr)
1852 TRACE("(%p %p)\n", this, ptr);
1853 return (unsigned short*)ptr-1;
1856 /* ?_Eos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXI@Z */
1857 /* ?_Eos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_K@Z */
1858 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Eos, 8)
1859 void __thiscall basic_string_wchar__Eos(basic_string_wchar *this, MSVCP_size_t len)
1865 void basic_string_wchar_clear(basic_string_wchar *this)
1867 basic_string_wchar__Eos(this, 0);
1870 /* ?_Tidy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEX_N@Z */
1871 /* ?_Tidy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_N@Z */
1872 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Tidy, 8)
1873 void __thiscall basic_string_wchar__Tidy(basic_string_wchar *this, MSVCP_bool built)
1875 TRACE("(%p %d)\n", this, built);
1877 if(!this->ptr || !built);
1878 else if(!this->ptr[-1] || (unsigned short)this->ptr[-1]==FROZEN)
1879 MSVCP_allocator_wchar_deallocate(NULL, this->ptr, this->res+2);
1883 memset(this, 0, sizeof(*this));
1886 /* ?_Grow@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAE_NI_N@Z */
1887 /* ?_Grow@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAA_N_K_N@Z */
1888 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Grow, 12)
1889 MSVCP_bool __thiscall basic_string_wchar__Grow(basic_string_wchar *this, MSVCP_size_t new_size, MSVCP_bool trim)
1893 basic_string_wchar__Tidy(this, TRUE);
1895 basic_string_wchar__Eos(this, 0);
1896 } else if(this->res<new_size || trim ||
1897 (this->ptr && this->ptr[-1] && (unsigned short)this->ptr[-1]!=FROZEN)) {
1898 MSVCP_size_t new_res = new_size, len = this->size;
1901 if(!trim && this->ptr && !this->ptr[-1]) {
1903 if(new_res/3 < this->res/2)
1904 new_res = this->res + this->res/2;
1907 ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_res+2);
1910 ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_size+2);
1913 ERR("Out of memory\n");
1922 char_traits_wchar__Copy_s(ptr+1, new_size, this->ptr, len);
1923 basic_string_wchar__Tidy(this, TRUE);
1925 this->res = new_res;
1926 basic_string_wchar__Eos(this, len);
1932 /* ?_Split@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXXZ */
1933 /* ?_Split@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAXXZ */
1934 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Split, 4)
1935 void __thiscall basic_string_wchar__Split(basic_string_wchar *this)
1940 TRACE("(%p)\n", this);
1942 if(!this->ptr || !this->ptr[-1] || (unsigned short)this->ptr[-1]==FROZEN)
1947 basic_string_wchar__Tidy(this, TRUE);
1948 if(basic_string_wchar__Grow(this, len, FALSE)) {
1949 char_traits_wchar__Copy_s(this->ptr, this->res, ptr, len);
1950 basic_string_wchar__Eos(this, len);
1954 /* ?_Freeze@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXXZ */
1955 /* ?_Freeze@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAXXZ */
1956 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Freeze, 4)
1957 void __thiscall basic_string_wchar__Freeze(basic_string_wchar *this)
1959 TRACE("(%p)\n", this);
1960 basic_string_wchar__Split(this);
1962 this->ptr[-1] = FROZEN;
1965 /* ?_Copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXI@Z */
1966 /* ?_Copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_K@Z */
1967 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Copy, 8)
1968 void __thiscall basic_string_wchar__Copy(basic_string_wchar *this, MSVCP_size_t copy_len)
1970 TRACE("%p %lu\n", this, copy_len);
1972 if(!basic_string_wchar__Grow(this, copy_len, FALSE))
1974 basic_string_wchar__Eos(this, copy_len);
1977 /* ?_Pdif@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAIPBG0@Z */
1978 /* ?_Pdif@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CA_KPEBG0@Z */
1979 MSVCP_size_t __cdecl basic_string_wchar__Pdif(const wchar_t *i1, const wchar_t *i2)
1981 TRACE("(%p %p)\n", i1, i2);
1982 return !i1 ? 0 : i1-i2;
1985 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPAGPAGI@Z */
1986 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEAGPEAG_K@Z */
1987 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGPBGI@Z */
1988 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGPEBG_K@Z */
1989 wchar_t* __cdecl basic_string_wchar__Psum(wchar_t *iter, MSVCP_size_t add)
1991 TRACE("(%p %lu)\n", iter, add);
1992 return iter ? iter+add : iter;
1995 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@II@Z */
1996 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0@Z */
1997 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase, 12)
1998 basic_string_wchar* __thiscall basic_string_wchar_erase(
1999 basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t len)
2001 TRACE("%p %lu %lu\n", this, pos, len);
2003 if(pos > this->size)
2006 if(len > this->size-pos)
2007 len = this->size-pos;
2010 basic_string_wchar__Split(this);
2011 char_traits_wchar__Move_s(this->ptr+pos, this->res-pos,
2012 this->ptr+pos+len, this->size-pos-len);
2013 basic_string_wchar__Eos(this, this->size-len);
2019 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAG0@Z */
2020 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAG0@Z */
2021 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase_iter, 12)
2022 wchar_t* __thiscall basic_string_wchar_erase_iter(basic_string_wchar *this, wchar_t *beg, wchar_t *end)
2024 MSVCP_size_t pos = basic_string_wchar__Pdif(beg, this->ptr);
2025 basic_string_wchar_erase(this, pos, basic_string_wchar__Pdif(end, beg));
2026 return basic_string_wchar__Psum(this->ptr, pos);
2029 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAG@Z */
2030 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAG@Z */
2031 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase_beg, 8)
2032 wchar_t* __thiscall basic_string_wchar_erase_beg(basic_string_wchar *this, wchar_t *beg)
2034 MSVCP_size_t pos = beg-this->ptr;
2035 basic_string_wchar_erase(this, pos, 1);
2036 return this->ptr+pos;
2039 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@II@Z */
2040 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
2041 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_substr, 16)
2042 basic_string_wchar* __thiscall basic_string_wchar_assign_substr(
2043 basic_string_wchar *this, const basic_string_wchar *assign,
2044 MSVCP_size_t pos, MSVCP_size_t len)
2046 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
2048 if(assign->size < pos)
2051 if(len > assign->size-pos)
2052 len = assign->size-pos;
2054 if(this == assign) {
2055 basic_string_wchar_erase(this, pos+len, basic_string_wchar_npos);
2056 basic_string_wchar_erase(this, 0, pos);
2057 } else if(basic_string_wchar__Grow(this, len, FALSE)) {
2058 char_traits_wchar__Copy_s(this->ptr, this->res,
2059 assign->ptr+pos, len);
2060 basic_string_wchar__Eos(this, len);
2066 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBGI@Z */
2067 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG_K@Z */
2068 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_cstr_len, 12)
2069 basic_string_wchar* __thiscall basic_string_wchar_assign_cstr_len(
2070 basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
2072 TRACE("%p %s %lu\n", this, debugstr_wn(str, len), len);
2074 if(basic_string_wchar_inside(this, str))
2075 return basic_string_wchar_assign_substr(this, this, str-this->ptr, len);
2076 else if(basic_string_wchar__Grow(this, len, FALSE)) {
2077 char_traits_wchar__Copy_s(this->ptr, this->res, str, len);
2078 basic_string_wchar__Eos(this, len);
2084 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@@Z */
2085 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@@Z */
2086 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@ABV01@@Z */
2087 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@AEBV01@@Z */
2088 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign, 8)
2089 basic_string_wchar* __thiscall basic_string_wchar_assign(
2090 basic_string_wchar *this, const basic_string_wchar *assign)
2092 return basic_string_wchar_assign_substr(this, assign,
2093 0, basic_string_wchar_npos);
2096 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG@Z */
2097 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG@Z */
2098 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@PBG@Z */
2099 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@PEBG@Z */
2100 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_cstr, 8)
2101 basic_string_wchar* __thiscall basic_string_wchar_assign_cstr(
2102 basic_string_wchar *this, const wchar_t *str)
2104 return basic_string_wchar_assign_cstr_len(this, str,
2105 char_traits_wchar_length(str));
2108 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@G@Z */
2109 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@G@Z */
2110 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_ch, 8)
2111 basic_string_wchar* __thiscall basic_string_wchar_assign_ch(
2112 basic_string_wchar *this, wchar_t ch)
2114 return basic_string_wchar_assign_cstr_len(this, &ch, 1);
2117 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IG@Z */
2118 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KG@Z */
2119 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assignn, 12)
2120 basic_string_wchar* __thiscall basic_string_wchar_assignn(
2121 basic_string_wchar *this, MSVCP_size_t count, wchar_t ch)
2123 TRACE("%p %ld %c\n", this, count, ch);
2125 basic_string_wchar__Grow(this, count, FALSE);
2126 char_traits_wchar_assignn(this->ptr, count, ch);
2127 basic_string_wchar__Eos(this, count);
2131 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG0@Z */
2132 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG0@Z */
2133 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_ptr_ptr, 12)
2134 basic_string_wchar* __thiscall basic_string_wchar_assign_ptr_ptr(
2135 basic_string_wchar *this, const wchar_t *first, const wchar_t *last)
2137 return basic_string_wchar_assign_cstr_len(this, first, last-first);
2140 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBGIABV?$allocator@G@1@@Z */
2141 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG_KAEBV?$allocator@G@1@@Z */
2142 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_cstr_len_alloc, 16)
2143 basic_string_wchar* __thiscall basic_string_wchar_ctor_cstr_len_alloc(
2144 basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len, const void *alloc)
2146 TRACE("%p %s %ld\n", this, debugstr_wn(str, len), len);
2148 basic_string_wchar__Tidy(this, FALSE);
2149 basic_string_wchar_assign_cstr_len(this, str, len);
2153 basic_string_wchar* basic_string_wchar_ctor_cstr_len(basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
2155 return basic_string_wchar_ctor_cstr_len_alloc(this, str, len, NULL);
2158 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV01@IIABV?$allocator@G@1@@Z */
2159 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV01@_K1AEBV?$allocator@G@1@@Z */
2160 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_substr_alloc, 20)
2161 basic_string_wchar* __thiscall basic_string_wchar_ctor_substr_alloc(
2162 basic_string_wchar *this, const basic_string_wchar *assign,
2163 MSVCP_size_t pos, MSVCP_size_t len, const void *alloc)
2165 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
2167 basic_string_wchar__Tidy(this, FALSE);
2168 basic_string_wchar_assign_substr(this, assign, pos, len);
2172 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBGABV?$allocator@G@1@@Z */
2173 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBGAEBV?$allocator@G@1@@Z */
2174 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_cstr_alloc, 12)
2175 basic_string_wchar* __thiscall basic_string_wchar_ctor_cstr_alloc(
2176 basic_string_wchar *this, const wchar_t *str, const void *alloc)
2178 TRACE("%p %s\n", this, debugstr_w(str));
2180 basic_string_wchar__Tidy(this, FALSE);
2181 basic_string_wchar_assign_cstr(this, str);
2185 basic_string_wchar* basic_string_wchar_ctor_cstr(basic_string_wchar *this, const wchar_t *str)
2187 return basic_string_wchar_ctor_cstr_alloc(this, str, NULL);
2190 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@IGABV?$allocator@G@1@@Z */
2191 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@_KGAEBV?$allocator@G@1@@Z */
2192 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_ch_alloc, 16)
2193 basic_string_wchar* __thiscall basic_string_wchar_ctor_ch_alloc(basic_string_wchar *this,
2194 MSVCP_size_t count, wchar_t ch, const void *alloc)
2196 TRACE("%p %ld %c\n", this, count, ch);
2198 basic_string_wchar__Tidy(this, FALSE);
2199 basic_string_wchar_assignn(this, count, ch);
2203 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBG0ABV?$allocator@G@1@@Z */
2204 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG0AEBV?$allocator@G@1@@Z */
2205 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_iter, 16)
2206 basic_string_wchar* __thiscall basic_string_wchar_ctor_iter(basic_string_wchar *this,
2207 const wchar_t *first, const wchar_t *last, allocator *alloc)
2209 TRACE("(%p %p %p %p)\n", this, first, last, alloc);
2211 basic_string_wchar__Tidy(this, FALSE);
2212 basic_string_wchar_assign_cstr_len(this, first, basic_string_wchar__Pdif(last, first));
2216 /* ??_F?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
2217 /* ??_F?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
2218 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor, 4)
2219 basic_string_wchar* __thiscall basic_string_wchar_ctor(basic_string_wchar *this)
2221 TRACE("%p\n", this);
2223 basic_string_wchar__Tidy(this, FALSE);
2227 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$allocator@G@1@@Z */
2228 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV?$allocator@G@1@@Z */
2229 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_alloc, 8)
2230 basic_string_wchar* __thiscall basic_string_wchar_ctor_alloc(
2231 basic_string_wchar *this, const void *alloc)
2233 TRACE("%p %p\n", this, alloc);
2235 basic_string_wchar__Tidy(this, FALSE);
2239 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV01@@Z */
2240 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV01@@Z */
2241 DEFINE_THISCALL_WRAPPER(basic_string_wchar_copy_ctor, 8)
2242 basic_string_wchar* __thiscall basic_string_wchar_copy_ctor(
2243 basic_string_wchar *this, const basic_string_wchar *copy)
2245 TRACE("%p %p\n", this, copy);
2247 basic_string_wchar__Tidy(this, FALSE);
2248 basic_string_wchar_assign(this, copy);
2252 /* ??1?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@XZ */
2253 /* ??1?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@XZ */
2254 DEFINE_THISCALL_WRAPPER(basic_string_wchar_dtor, 4)
2255 void __thiscall basic_string_wchar_dtor(basic_string_wchar *this)
2257 TRACE("%p\n", this);
2258 basic_string_wchar__Tidy(this, TRUE);
2261 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIPBGI@Z */
2262 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0PEBG0@Z */
2263 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr_cstr_len, 20)
2264 int __thiscall basic_string_wchar_compare_substr_cstr_len(
2265 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2266 const wchar_t *str, MSVCP_size_t count)
2270 TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_wn(str, count), count);
2272 if(this->size < pos)
2275 if(num > this->size-pos)
2276 num = this->size-pos;
2278 ans = char_traits_wchar_compare(this->ptr+pos,
2279 str, num>count ? count : num);
2285 else if(num < count)
2290 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHPBG@Z */
2291 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAHPEBG@Z */
2292 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_cstr, 8)
2293 int __thiscall basic_string_wchar_compare_cstr(
2294 const basic_string_wchar *this, const wchar_t *str)
2296 return basic_string_wchar_compare_substr_cstr_len(this, 0, this->size,
2297 str, char_traits_wchar_length(str));
2300 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIABV12@II@Z */
2301 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0AEBV12@00@Z */
2302 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr_substr, 24)
2303 int __thiscall basic_string_wchar_compare_substr_substr(
2304 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2305 const basic_string_wchar *compare, MSVCP_size_t off, MSVCP_size_t count)
2307 TRACE("%p %lu %lu %p %lu %lu\n", this, pos, num, compare, off, count);
2309 if(compare->size < off)
2312 if(count > compare->size-off)
2313 count = compare->size-off;
2315 return basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2316 compare->ptr+off, count);
2319 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIABV12@@Z */
2320 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0AEBV12@@Z */
2321 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr, 16)
2322 int __thiscall basic_string_wchar_compare_substr(
2323 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2324 const basic_string_wchar *compare)
2326 return basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2327 compare->ptr, compare->size);
2330 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHABV12@@Z */
2331 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAHAEBV12@@Z */
2332 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare, 8)
2333 int __thiscall basic_string_wchar_compare(
2334 const basic_string_wchar *this, const basic_string_wchar *compare)
2336 return basic_string_wchar_compare_substr_cstr_len(this, 0, this->size,
2337 compare->ptr, compare->size);
2340 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIPBG@Z */
2341 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0PEBG@Z */
2342 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr_cstr, 16)
2343 int __thiscall basic_string_wchar_compare_substr_cstr(const basic_string_wchar *this,
2344 MSVCP_size_t pos, MSVCP_size_t num, const wchar_t *str)
2346 return basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2347 str, char_traits_wchar_length(str));
2350 /* ??$?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 */
2351 /* ??$?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 */
2352 /* ??8std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2353 /* ??8std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2354 MSVCP_bool __cdecl basic_string_wchar_equal(
2355 const basic_string_wchar *left, const basic_string_wchar *right)
2357 return basic_string_wchar_compare(left, right) == 0;
2360 /* ??$?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 */
2361 /* ??$?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 */
2362 /* ??8std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2363 /* ??8std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2364 MSVCP_bool __cdecl basic_string_wchar_equal_str_cstr(
2365 const basic_string_wchar *left, const wchar_t *right)
2367 return basic_string_wchar_compare_cstr(left, right) == 0;
2370 /* ??$?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 */
2371 /* ??$?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 */
2372 /* ??8std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2373 /* ??8std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2374 MSVCP_bool __cdecl basic_string_wchar_equal_cstr_str(
2375 const wchar_t *left, const basic_string_wchar *right)
2377 return basic_string_wchar_compare_cstr(right, left) == 0;
2380 /* ??$?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 */
2381 /* ??$?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 */
2382 /* ??9std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2383 /* ??9std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2384 MSVCP_bool __cdecl basic_string_wchar_not_equal(
2385 const basic_string_wchar *left, const basic_string_wchar *right)
2387 return basic_string_wchar_compare(left, right) != 0;
2390 /* ??$?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 */
2391 /* ??$?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 */
2392 /* ??9std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2393 /* ??9std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2394 MSVCP_bool __cdecl basic_string_wchar_not_equal_str_cstr(
2395 const basic_string_wchar *left, const wchar_t *right)
2397 return basic_string_wchar_compare_cstr(left, right) != 0;
2400 /* ??$?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 */
2401 /* ??$?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 */
2402 /* ??9std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2403 /* ??9std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2404 MSVCP_bool __cdecl basic_string_wchar_not_equal_cstr_str(
2405 const wchar_t *left, const basic_string_wchar *right)
2407 return basic_string_wchar_compare_cstr(right, left) != 0;
2410 /* ??$?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 */
2411 /* ??$?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 */
2412 /* ??Mstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2413 /* ??Mstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2414 MSVCP_bool __cdecl basic_string_wchar_lower(
2415 const basic_string_wchar *left, const basic_string_wchar *right)
2417 return basic_string_wchar_compare(left, right) < 0;
2420 /* ??$?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 */
2421 /* ??$?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 */
2422 /* ??Mstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2423 /* ??Mstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2424 MSVCP_bool __cdecl basic_string_wchar_lower_bstr_cstr(
2425 const basic_string_wchar *left, const wchar_t *right)
2427 return basic_string_wchar_compare_cstr(left, right) < 0;
2430 /* ??$?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 */
2431 /* ??$?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 */
2432 /* ??Mstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2433 /* ??Mstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2434 MSVCP_bool __cdecl basic_string_wchar_lower_cstr_bstr(
2435 const wchar_t *left, const basic_string_wchar *right)
2437 return basic_string_wchar_compare_cstr(right, left) > 0;
2440 /* ??$?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 */
2441 /* ??$?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 */
2442 /* ??Nstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2443 /* ??Nstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2444 MSVCP_bool __cdecl basic_string_wchar_leq(
2445 const basic_string_wchar *left, const basic_string_wchar *right)
2447 return basic_string_wchar_compare(left, right) <= 0;
2450 /* ??$?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 */
2451 /* ??$?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 */
2452 /* ??Nstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2453 /* ??Nstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2454 MSVCP_bool __cdecl basic_string_wchar_leq_bstr_cstr(
2455 const basic_string_wchar *left, const wchar_t *right)
2457 return basic_string_wchar_compare_cstr(left, right) <= 0;
2460 /* ??$?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 */
2461 /* ??$?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 */
2462 /* ??Nstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2463 /* ??Nstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2464 MSVCP_bool __cdecl basic_string_wchar_leq_cstr_bstr(
2465 const wchar_t *left, const basic_string_wchar *right)
2467 return basic_string_wchar_compare_cstr(right, left) >= 0;
2470 /* ??$?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 */
2471 /* ??$?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 */
2472 /* ??Ostd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2473 /* ??Ostd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2474 MSVCP_bool __cdecl basic_string_wchar_greater(
2475 const basic_string_wchar *left, const basic_string_wchar *right)
2477 return basic_string_wchar_compare(left, right) > 0;
2480 /* ??$?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 */
2481 /* ??$?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 */
2482 /* ??Ostd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2483 /* ??Ostd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2484 MSVCP_bool __cdecl basic_string_wchar_greater_bstr_cstr(
2485 const basic_string_wchar *left, const wchar_t *right)
2487 return basic_string_wchar_compare_cstr(left, right) > 0;
2490 /* ??$?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 */
2491 /* ??$?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 */
2492 /* ??Ostd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2493 /* ??Ostd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2494 MSVCP_bool __cdecl basic_string_wchar_greater_cstr_bstr(
2495 const wchar_t *left, const basic_string_wchar *right)
2497 return basic_string_wchar_compare_cstr(right, left) < 0;
2500 /* ??$?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 */
2501 /* ??$?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 */
2502 /* ??Pstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2503 /* ??Pstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2504 MSVCP_bool __cdecl basic_string_wchar_geq(
2505 const basic_string_wchar *left, const basic_string_wchar *right)
2507 return basic_string_wchar_compare(left, right) >= 0;
2510 /* ??$?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 */
2511 /* ??$?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 */
2512 /* ??Pstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2513 /* ??Pstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2514 MSVCP_bool __cdecl basic_string_wchar_geq_bstr_cstr(
2515 const basic_string_wchar *left, const wchar_t *right)
2517 return basic_string_wchar_compare_cstr(left, right) >= 0;
2520 /* ??$?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 */
2521 /* ??$?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 */
2522 /* ??Pstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2523 /* ??Pstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2524 MSVCP_bool __cdecl basic_string_wchar_geq_cstr_bstr(
2525 const wchar_t *left, const basic_string_wchar *right)
2527 return basic_string_wchar_compare_cstr(right, left) <= 0;
2530 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2531 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2532 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_cstr_substr, 16)
2533 MSVCP_size_t __thiscall basic_string_wchar_find_cstr_substr(
2534 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos, MSVCP_size_t len)
2536 const wchar_t *p, *end;
2538 TRACE("%p %s %lu %lu\n", this, debugstr_wn(find, len), pos, len);
2540 if(len==0 && pos<=this->size)
2542 if(pos>=this->size || len>this->size)
2543 return basic_string_wchar_npos;
2545 end = this->ptr+this->size-len+1;
2546 for(p=this->ptr+pos; p<end; p++) {
2547 p = char_traits_wchar_find(p, end-p, find);
2551 if(!char_traits_wchar_compare(p, find, len))
2555 return basic_string_wchar_npos;
2558 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2559 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2560 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_off, 12)
2561 MSVCP_size_t __thiscall basic_string_wchar_find_off(
2562 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2564 return basic_string_wchar_find_cstr_substr(this, find->ptr, off, find->size);
2567 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2568 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2569 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_ch, 12)
2570 MSVCP_size_t __thiscall basic_string_wchar_find_ch(
2571 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t pos)
2573 return basic_string_wchar_find_cstr_substr(this, &ch, pos, 1);
2576 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2577 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2578 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_cstr_off, 12)
2579 MSVCP_size_t __thiscall basic_string_wchar_find_cstr_off(
2580 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos)
2582 return basic_string_wchar_find_cstr_substr(this, find, pos,
2583 char_traits_wchar_length(find));
2586 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2587 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2588 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_cstr_substr, 16)
2589 MSVCP_size_t __thiscall basic_string_wchar_rfind_cstr_substr(
2590 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos, MSVCP_size_t len)
2592 const wchar_t *p, *end;
2594 TRACE("%p %s %lu %lu\n", this, debugstr_wn(find, len), pos, len);
2597 return pos<this->size ? pos : this->size;
2599 if(len > this->size)
2600 return basic_string_wchar_npos;
2602 if(pos > this->size-len+1)
2603 pos = this->size-len+1;
2605 for(p=end+pos-1; p>=end; p--) {
2606 if(*p==*find && !char_traits_wchar_compare(p, find, len))
2610 return basic_string_wchar_npos;
2613 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2614 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2615 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_off, 12)
2616 MSVCP_size_t __thiscall basic_string_wchar_rfind_off(
2617 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2619 return basic_string_wchar_rfind_cstr_substr(this, find->ptr, off, find->size);
2622 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2623 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2624 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_ch, 12)
2625 MSVCP_size_t __thiscall basic_string_wchar_rfind_ch(
2626 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t pos)
2628 return basic_string_wchar_rfind_cstr_substr(this, &ch, pos, 1);
2631 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2632 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2633 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_cstr_off, 12)
2634 MSVCP_size_t __thiscall basic_string_wchar_rfind_cstr_off(
2635 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos)
2637 return basic_string_wchar_rfind_cstr_substr(this, find, pos,
2638 char_traits_wchar_length(find));
2641 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2642 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2643 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of_cstr_substr, 16)
2644 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of_cstr_substr(
2645 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2647 const wchar_t *p, *end;
2649 TRACE("%p %p %lu %lu\n", this, find, off, len);
2651 if(off<this->size) {
2652 end = this->ptr+this->size;
2653 for(p=this->ptr+off; p<end; p++)
2654 if(!char_traits_wchar_find(find, len, p))
2658 return basic_string_wchar_npos;
2661 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2662 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2663 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of, 12)
2664 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of(
2665 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2667 return basic_string_wchar_find_first_not_of_cstr_substr(this,
2668 find->ptr, off, find->size);
2671 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2672 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2673 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of_ch, 12)
2674 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of_ch(
2675 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2677 return basic_string_wchar_find_first_not_of_cstr_substr(this, &ch, off, 1);
2680 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2681 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2682 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of_cstr, 12)
2683 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of_cstr(
2684 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2686 return basic_string_wchar_find_first_not_of_cstr_substr(
2687 this, find, off, char_traits_wchar_length(find));
2690 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2691 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2692 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of_cstr_substr, 16)
2693 MSVCP_size_t __thiscall basic_string_wchar_find_first_of_cstr_substr(
2694 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2696 const wchar_t *p, *end;
2698 TRACE("%p %p %lu %lu\n", this, find, off, len);
2700 if(len>0 && off<this->size) {
2701 end = this->ptr+this->size;
2702 for(p=this->ptr+off; p<end; p++)
2703 if(char_traits_wchar_find(find, len, p))
2707 return basic_string_wchar_npos;
2710 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2711 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2712 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of, 12)
2713 MSVCP_size_t __thiscall basic_string_wchar_find_first_of(
2714 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2716 return basic_string_wchar_find_first_of_cstr_substr(this,
2717 find->ptr, off, find->size);
2720 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2721 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2722 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of_ch, 12)
2723 MSVCP_size_t __thiscall basic_string_wchar_find_first_of_ch(
2724 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2726 return basic_string_wchar_find_first_of_cstr_substr(this, &ch, off, 1);
2729 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2730 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2731 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of_cstr, 12)
2732 MSVCP_size_t __thiscall basic_string_wchar_find_first_of_cstr(
2733 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2735 return basic_string_wchar_find_first_of_cstr_substr(
2736 this, find, off, char_traits_wchar_length(find));
2739 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2740 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2741 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of_cstr_substr, 16)
2742 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of_cstr_substr(
2743 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2745 const wchar_t *p, *beg;
2747 TRACE("%p %p %lu %lu\n", this, find, off, len);
2749 if(len>0 && this->size>0) {
2750 if(off >= this->size)
2754 for(p=beg+off; p>=beg; p--)
2755 if(!char_traits_wchar_find(find, len, p))
2759 return basic_string_wchar_npos;
2762 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2763 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2764 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of, 12)
2765 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of(
2766 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2768 return basic_string_wchar_find_last_not_of_cstr_substr(this,
2769 find->ptr, off, find->size);
2772 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2773 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2774 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of_ch, 12)
2775 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of_ch(
2776 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2778 return basic_string_wchar_find_last_not_of_cstr_substr(this, &ch, off, 1);
2781 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2782 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2783 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of_cstr, 12)
2784 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of_cstr(
2785 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2787 return basic_string_wchar_find_last_not_of_cstr_substr(
2788 this, find, off, char_traits_wchar_length(find));
2791 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2792 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2793 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of_cstr_substr, 16)
2794 MSVCP_size_t __thiscall basic_string_wchar_find_last_of_cstr_substr(
2795 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2797 const wchar_t *p, *beg;
2799 TRACE("%p %p %lu %lu\n", this, find, off, len);
2801 if(len>0 && this->size>0) {
2802 if(off >= this->size)
2806 for(p=beg+off; p>=beg; p--)
2807 if(char_traits_wchar_find(find, len, p))
2811 return basic_string_wchar_npos;
2814 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2815 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2816 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of, 12)
2817 MSVCP_size_t __thiscall basic_string_wchar_find_last_of(
2818 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2820 return basic_string_wchar_find_last_of_cstr_substr(this,
2821 find->ptr, off, find->size);
2824 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2825 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2826 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of_ch, 12)
2827 MSVCP_size_t __thiscall basic_string_wchar_find_last_of_ch(
2828 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2830 return basic_string_wchar_find_last_of_cstr_substr(this, &ch, off, 1);
2833 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2834 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2835 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of_cstr, 12)
2836 MSVCP_size_t __thiscall basic_string_wchar_find_last_of_cstr(
2837 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2839 return basic_string_wchar_find_last_of_cstr_substr(
2840 this, find, off, char_traits_wchar_length(find));
2843 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@II@Z */
2844 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
2845 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_substr, 16)
2846 basic_string_wchar* __thiscall basic_string_wchar_append_substr(basic_string_wchar *this,
2847 const basic_string_wchar *append, MSVCP_size_t offset, MSVCP_size_t count)
2849 TRACE("%p %p %lu %lu\n", this, append, offset, count);
2851 if(append->size < offset)
2854 if(count > append->size-offset)
2855 count = append->size-offset;
2857 if(basic_string_wchar_npos-this->size<=count || this->size+count<this->size)
2860 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2861 char_traits_wchar__Copy_s(this->ptr+this->size,
2862 this->res-this->size, append->ptr+offset, count);
2863 basic_string_wchar__Eos(this, this->size+count);
2869 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBGI@Z */
2870 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG_K@Z */
2871 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_cstr_len, 12)
2872 basic_string_wchar* __thiscall basic_string_wchar_append_cstr_len(
2873 basic_string_wchar *this, const wchar_t *append, MSVCP_size_t count)
2875 TRACE("%p %s %lu\n", this, debugstr_wn(append, count), count);
2877 if(basic_string_wchar_inside(this, append))
2878 return basic_string_wchar_append_substr(this, this, append-this->ptr, count);
2880 if(basic_string_wchar_npos-this->size<=count || this->size+count<this->size)
2883 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2884 char_traits_wchar__Copy_s(this->ptr+this->size,
2885 this->res-this->size, append, count);
2886 basic_string_wchar__Eos(this, this->size+count);
2892 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IG@Z */
2893 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KG@Z */
2894 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_len_ch, 12)
2895 basic_string_wchar* __thiscall basic_string_wchar_append_len_ch(
2896 basic_string_wchar *this, MSVCP_size_t count, wchar_t ch)
2898 TRACE("%p %lu %c\n", this, count, ch);
2900 if(basic_string_wchar_npos-this->size <= count)
2903 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2904 char_traits_wchar_assignn(this->ptr+this->size, count, ch);
2905 basic_string_wchar__Eos(this, this->size+count);
2911 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@@Z */
2912 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@@Z */
2913 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@ABV01@@Z */
2914 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@AEBV01@@Z */
2915 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append, 8)
2916 basic_string_wchar* __thiscall basic_string_wchar_append(
2917 basic_string_wchar *this, const basic_string_wchar *append)
2919 return basic_string_wchar_append_substr(this, append,
2920 0, basic_string_wchar_npos);
2923 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@G@Z */
2924 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@G@Z */
2925 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_ch, 8)
2926 basic_string_wchar* __thiscall basic_string_wchar_append_ch(
2927 basic_string_wchar *this, wchar_t ch)
2929 return basic_string_wchar_append_len_ch(this, 1, ch);
2932 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG0@Z */
2933 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG0@Z */
2934 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_beg_end, 12)
2935 basic_string_wchar* __thiscall basic_string_wchar_append_beg_end(
2936 basic_string_wchar *this, const wchar_t *beg, const wchar_t *end)
2938 return basic_string_wchar_append_cstr_len(this, beg, end-beg);
2941 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG@Z */
2942 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG@Z */
2943 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@PBG@Z */
2944 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@PEBG@Z */
2945 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_cstr, 8)
2946 basic_string_wchar* __thiscall basic_string_wchar_append_cstr(
2947 basic_string_wchar *this, const wchar_t *append)
2949 return basic_string_wchar_append_cstr_len(this, append,
2950 char_traits_wchar_length(append));
2952 /* ??$?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 */
2953 /* ??$?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 */
2954 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@0@Z */
2955 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@0@Z */
2956 basic_string_wchar* __cdecl basic_string_wchar_concatenate(basic_string_wchar *ret,
2957 const basic_string_wchar *left, const basic_string_wchar *right)
2959 TRACE("%p %p\n", left, right);
2961 basic_string_wchar_copy_ctor(ret, left);
2962 basic_string_wchar_append(ret, right);
2966 /* ??$?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 */
2967 /* ??$?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 */
2968 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@G@Z */
2969 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@G@Z */
2970 basic_string_wchar* __cdecl basic_string_wchar_concatenate_bstr_ch(basic_string_wchar *ret,
2971 const basic_string_wchar *left, wchar_t right)
2973 TRACE("%p %c\n", left, right);
2975 basic_string_wchar_copy_ctor(ret, left);
2976 basic_string_wchar_append_ch(ret, right);
2980 /* ??$?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 */
2981 /* ??$?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 */
2982 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@PBG@Z */
2983 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@PEBG@Z */
2984 basic_string_wchar* __cdecl basic_string_wchar_concatenate_bstr_cstr(basic_string_wchar *ret,
2985 const basic_string_wchar *left, const wchar_t *right)
2987 TRACE("%p %s\n", left, debugstr_w(right));
2989 basic_string_wchar_copy_ctor(ret, left);
2990 basic_string_wchar_append_cstr(ret, right);
2994 /* ??$?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 */
2995 /* ??$?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 */
2996 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GABV10@@Z */
2997 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GAEBV10@@Z */
2998 basic_string_wchar* __cdecl basic_string_wchar_concatenate_ch_bstr(basic_string_wchar *ret,
2999 wchar_t left, const basic_string_wchar *right)
3001 TRACE("%c %p\n", left, right);
3003 basic_string_wchar_ctor_cstr_len_alloc(ret, &left, 1, NULL);
3004 basic_string_wchar_append(ret, right);
3008 /* ??$?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 */
3009 /* ??$?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 */
3010 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBGABV10@@Z */
3011 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBGAEBV10@@Z */
3012 basic_string_wchar* __cdecl basic_string_wchar_concatenate_cstr_bstr(basic_string_wchar *ret,
3013 const wchar_t *left, const basic_string_wchar *right)
3015 TRACE("%s %p\n", debugstr_w(left), right);
3017 basic_string_wchar_ctor_cstr_alloc(ret, left, NULL);
3018 basic_string_wchar_append(ret, right);
3022 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGI@Z */
3023 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAG_K@Z */
3024 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEABGI@Z */
3025 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAAEBG_K@Z */
3026 DEFINE_THISCALL_WRAPPER(basic_string_wchar_operator_at, 8)
3027 wchar_t* __thiscall basic_string_wchar_operator_at(
3028 basic_string_wchar *this, MSVCP_size_t pos)
3030 TRACE("%p %lu\n", this, pos);
3032 assert(this->size >= pos);
3033 return this->ptr+pos;
3036 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGI@Z */
3037 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAG_K@Z */
3038 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEABGI@Z */
3039 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAAEBG_K@Z */
3040 DEFINE_THISCALL_WRAPPER(basic_string_wchar_at, 8)
3041 wchar_t* __thiscall basic_string_wchar_at(
3042 basic_string_wchar *this, MSVCP_size_t pos)
3044 TRACE("%p %lu\n", this, pos);
3046 if(this->size <= pos)
3049 return this->ptr+pos;
3052 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIPBGI@Z */
3053 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG0@Z */
3054 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_cstr_len, 20)
3055 basic_string_wchar* __thiscall basic_string_wchar_replace_cstr_len(basic_string_wchar *this,
3056 MSVCP_size_t off, MSVCP_size_t len, const wchar_t *str, MSVCP_size_t str_len)
3058 MSVCP_size_t inside_pos = -1;
3059 wchar_t *ptr = this->ptr;
3061 TRACE("%p %ld %ld %p %ld\n", this, off, len, str, str_len);
3063 if(this->size < off)
3066 if(len > this->size-off)
3067 len = this->size-off;
3069 if(basic_string_wchar_npos-str_len <= this->size-len)
3072 if(basic_string_wchar_inside(this, str))
3073 inside_pos = str-ptr;
3075 if(this->size-len+str_len)
3076 basic_string_wchar__Grow(this, this->size-len+str_len, FALSE);
3079 if(inside_pos == -1) {
3080 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3081 memcpy(ptr+off, str, str_len*sizeof(char));
3082 } else if(len >= str_len) {
3083 memmove(ptr+off, ptr+inside_pos, str_len*sizeof(char));
3084 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3088 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3090 if(inside_pos < off+len) {
3091 size = off+len-inside_pos;
3094 memmove(ptr+off, ptr+inside_pos, size*sizeof(char));
3100 memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(char));
3103 basic_string_wchar__Eos(this, this->size-len+str_len);
3107 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@II@Z */
3108 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0AEBV12@00@Z */
3109 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_substr, 24)
3110 basic_string_wchar* __thiscall basic_string_wchar_replace_substr(basic_string_wchar *this, MSVCP_size_t off,
3111 MSVCP_size_t len, const basic_string_wchar *str, MSVCP_size_t str_off, MSVCP_size_t str_len)
3113 if(str->size < str_off)
3116 if(str_len > str->size-str_off)
3117 str_len = str->size-str_off;
3119 return basic_string_wchar_replace_cstr_len(this, off, len,
3120 str->ptr+str_off, str_len);
3123 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@@Z */
3124 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0AEBV12@@Z */
3125 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace, 16)
3126 basic_string_wchar* __thiscall basic_string_wchar_replace(basic_string_wchar *this,
3127 MSVCP_size_t off, MSVCP_size_t len, const basic_string_wchar *str)
3129 return basic_string_wchar_replace_cstr_len(this, off, len,
3130 str->ptr, str->size);
3133 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIIG@Z */
3134 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K00G@Z */
3135 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_ch, 20)
3136 basic_string_wchar* __thiscall basic_string_wchar_replace_ch(basic_string_wchar *this,
3137 MSVCP_size_t off, MSVCP_size_t len, MSVCP_size_t count, wchar_t ch)
3141 TRACE("%p %ld %ld %ld %c\n", this, off, len, count, ch);
3143 if(this->size < off)
3146 if(len > this->size-off)
3147 len = this->size-off;
3149 if(basic_string_wchar_npos-count <= this->size-len)
3152 if(this->size-len+count)
3153 basic_string_wchar__Grow(this, this->size-len+count, FALSE);
3156 memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(char));
3157 char_traits_wchar_assignn(ptr+off, count, ch);
3158 basic_string_wchar__Eos(this, this->size-len+count);
3163 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIPBG@Z */
3164 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG@Z */
3165 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_cstr, 16)
3166 basic_string_wchar* __thiscall basic_string_wchar_replace_cstr(basic_string_wchar *this,
3167 MSVCP_size_t off, MSVCP_size_t len, const wchar_t *str)
3169 return basic_string_wchar_replace_cstr_len(this, off, len, str,
3170 char_traits_wchar_length(str));
3173 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0ABV12@@Z */
3174 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0AEBV12@@Z */
3175 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_bstr, 16)
3176 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_bstr(basic_string_wchar *this,
3177 wchar_t *beg, wchar_t *end, const basic_string_wchar *str)
3179 return basic_string_wchar_replace(this, basic_string_wchar__Pdif(beg, this->ptr),
3180 basic_string_wchar__Pdif(end, beg), str);
3183 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0IG@Z */
3184 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0_KG@Z */
3185 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_chn, 20)
3186 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_chn(basic_string_wchar *this,
3187 wchar_t *beg, wchar_t *end, MSVCP_size_t count, wchar_t ch)
3189 return basic_string_wchar_replace_ch(this, basic_string_wchar__Pdif(beg, this->ptr),
3190 basic_string_wchar__Pdif(end, beg), count, ch);
3193 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBG1@Z */
3194 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG1@Z */
3195 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_iter, 20)
3196 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_iter(basic_string_wchar *this,
3197 wchar_t *beg1, wchar_t *end1, const wchar_t *beg2, const wchar_t *end2)
3199 return basic_string_wchar_replace_cstr_len(this, basic_string_wchar__Pdif(beg1, this->ptr),
3200 basic_string_wchar__Pdif(end1, beg1), beg2, basic_string_wchar__Pdif(end2, beg2));
3203 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBG@Z */
3204 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG@Z */
3205 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr, 16)
3206 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr(basic_string_wchar *this,
3207 wchar_t *beg, wchar_t *end, const wchar_t *str)
3209 return basic_string_wchar_replace_cstr(this, basic_string_wchar__Pdif(beg, this->ptr),
3210 basic_string_wchar__Pdif(end, beg), str);
3213 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBGI@Z */
3214 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG_K@Z */
3215 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr_len, 20)
3216 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr_len(basic_string_wchar *this,
3217 wchar_t *beg, wchar_t *end, const wchar_t *str, MSVCP_size_t len)
3219 return basic_string_wchar_replace_cstr_len(this, basic_string_wchar__Pdif(beg, this->ptr),
3220 basic_string_wchar__Pdif(end, beg), str, len);
3223 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IABV12@@Z */
3224 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KAEBV12@@Z */
3225 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert, 12)
3226 basic_string_wchar* __thiscall basic_string_wchar_insert(basic_string_wchar *this,
3227 MSVCP_size_t off, const basic_string_wchar *str)
3229 return basic_string_wchar_replace(this, off, 0, str);
3232 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IABV12@II@Z */
3233 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KAEBV12@00@Z */
3234 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_substr, 20)
3235 basic_string_wchar* __thiscall basic_string_wchar_insert_substr(
3236 basic_string_wchar *this, MSVCP_size_t off, const basic_string_wchar *str,
3237 MSVCP_size_t str_off, MSVCP_size_t str_count)
3239 return basic_string_wchar_replace_substr(this, off, 0, str, str_off, str_count);
3242 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IPBG@Z */
3243 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KPEBG@Z */
3244 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_cstr, 12)
3245 basic_string_wchar* __thiscall basic_string_wchar_insert_cstr(
3246 basic_string_wchar *this, MSVCP_size_t off, const wchar_t *str)
3248 return basic_string_wchar_replace_cstr(this, off, 0, str);
3251 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IPBGI@Z */
3252 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KPEBG0@Z */
3253 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_cstr_len, 16)
3254 basic_string_wchar* __thiscall basic_string_wchar_insert_cstr_len(basic_string_wchar *this,
3255 MSVCP_size_t off, const wchar_t *str, MSVCP_size_t str_len)
3257 return basic_string_wchar_replace_cstr_len(this, off, 0, str, str_len);
3260 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIG@Z */
3261 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0G@Z */
3262 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_chn, 16)
3263 basic_string_wchar* __thiscall basic_string_wchar_insert_chn(basic_string_wchar *this,
3264 MSVCP_size_t off, MSVCP_size_t count, wchar_t ch)
3266 return basic_string_wchar_replace_ch(this, off, 0, count, ch);
3269 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAGG@Z */
3270 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAGG@Z */
3271 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter_ch, 12)
3272 wchar_t* __thiscall basic_string_wchar_insert_iter_ch(basic_string_wchar *this, wchar_t *pos, wchar_t ch)
3274 MSVCP_size_t off = basic_string_wchar__Pdif(pos, this->ptr);
3275 basic_string_wchar_insert_chn(this, off, 1, ch);
3276 return basic_string_wchar__Psum(this->ptr, off);
3279 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXPAGIG@Z */
3280 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXPEAG_KG@Z */
3281 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter_chn, 16)
3282 void __thiscall basic_string_wchar_insert_iter_chn(basic_string_wchar *this,
3283 wchar_t *pos, MSVCP_size_t n, wchar_t ch)
3285 basic_string_wchar_insert_chn(this, basic_string_wchar__Pdif(pos, this->ptr), n, ch);
3288 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXPAGPBG1@Z */
3289 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXPEAGPEBG1@Z */
3290 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter, 16)
3291 void __thiscall basic_string_wchar_insert_iter(basic_string_wchar *this,
3292 wchar_t *pos, const wchar_t *beg, const wchar_t *end)
3294 basic_string_wchar_insert_cstr_len(this, basic_string_wchar__Pdif(pos, this->ptr),
3295 beg, basic_string_wchar__Pdif(end, beg));
3298 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXIG@Z */
3299 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_KG@Z */
3300 DEFINE_THISCALL_WRAPPER(basic_string_wchar_resize_ch, 12)
3301 void __thiscall basic_string_wchar_resize_ch(
3302 basic_string_wchar *this, MSVCP_size_t size, wchar_t ch)
3304 TRACE("%p %lu %c\n", this, size, ch);
3306 if(size <= this->size)
3307 basic_string_wchar_erase(this, size, this->size);
3309 basic_string_wchar_append_len_ch(this, size-this->size, ch);
3312 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXI@Z */
3313 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_K@Z */
3314 DEFINE_THISCALL_WRAPPER(basic_string_wchar_resize, 8)
3315 void __thiscall basic_string_wchar_resize(
3316 basic_string_wchar *this, MSVCP_size_t size)
3318 basic_string_wchar_resize_ch(this, size, '\0');
3321 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGXZ */
3322 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGXZ */
3323 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3324 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3325 DEFINE_THISCALL_WRAPPER(basic_string_wchar_begin, 4)
3326 wchar_t* __thiscall basic_string_wchar_begin(basic_string_wchar *this)
3328 TRACE("(%p)\n", this);
3329 basic_string_wchar__Freeze(this);
3333 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGXZ */
3334 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGXZ */
3335 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3336 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3337 DEFINE_THISCALL_WRAPPER(basic_string_wchar_end, 4)
3338 wchar_t* __thiscall basic_string_wchar_end(basic_string_wchar *this)
3340 TRACE("(%p)\n", this);
3341 basic_string_wchar__Freeze(this);
3342 return this->ptr+this->size;
3345 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@PAGGAAGPAGH@2@XZ */
3346 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@PEAGGAEAGPEAG_J@2@XZ */
3347 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@PBGGABGPBGH@2@XZ */
3348 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@PEBGGAEBGPEBG_J@2@XZ */
3349 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rbegin, 8)
3350 String_reverse_iterator_wchar* __thiscall basic_string_wchar_rbegin(
3351 basic_string_wchar *this, String_reverse_iterator_wchar *ret)
3353 TRACE("(%p %p)\n", this, ret);
3354 ret->ptr = basic_string_wchar_end(this);
3358 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@PAGGAAGPAGH@2@XZ */
3359 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@PEAGGAEAGPEAG_J@2@XZ */
3360 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@PBGGABGPBGH@2@XZ */
3361 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@PEBGGAEBGPEBG_J@2@XZ */
3362 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rend, 8)
3363 String_reverse_iterator_wchar* __thiscall basic_string_wchar_rend(
3364 basic_string_wchar *this, String_reverse_iterator_wchar *ret)
3366 TRACE("(%p %p)\n", this, ret);
3367 ret->ptr = basic_string_wchar_begin(this);
3371 /* ?c_str@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3372 /* ?c_str@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3373 /* ?data@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3374 /* ?data@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3375 DEFINE_THISCALL_WRAPPER(basic_string_wchar_c_str, 4)
3376 const wchar_t* __thiscall basic_string_wchar_c_str(const basic_string_wchar *this)
3378 TRACE("%p\n", this);
3382 /* ?size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3383 /* ?size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3384 /* ?length@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3385 /* ?length@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3386 DEFINE_THISCALL_WRAPPER(basic_string_wchar_length, 4)
3387 MSVCP_size_t __thiscall basic_string_wchar_length(const basic_string_wchar *this)
3389 TRACE("%p\n", this);
3393 /* ?max_size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3394 /* ?max_size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3395 DEFINE_THISCALL_WRAPPER(basic_string_wchar_max_size, 4)
3396 MSVCP_size_t __thiscall basic_string_wchar_max_size(const basic_string_wchar *this)
3398 TRACE("%p\n", this);
3399 return MSVCP_allocator_wchar_max_size(NULL)-1;
3402 /* ?capacity@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3403 /* ?capacity@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3404 DEFINE_THISCALL_WRAPPER(basic_string_wchar_capacity, 4)
3405 MSVCP_size_t __thiscall basic_string_wchar_capacity(basic_string_wchar *this)
3407 TRACE("%p\n", this);
3411 /* ?reserve@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXI@Z */
3412 /* ?reserve@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_K@Z */
3413 DEFINE_THISCALL_WRAPPER(basic_string_wchar_reserve, 8)
3414 void __thiscall basic_string_wchar_reserve(basic_string_wchar *this, MSVCP_size_t size)
3418 TRACE("%p %ld\n", this, size);
3424 basic_string_wchar__Grow(this, size, FALSE);
3425 basic_string_wchar__Eos(this, len);
3428 /* ?empty@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE_NXZ */
3429 /* ?empty@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_NXZ */
3430 DEFINE_THISCALL_WRAPPER(basic_string_wchar_empty, 4)
3431 MSVCP_bool __thiscall basic_string_wchar_empty(basic_string_wchar *this)
3433 TRACE("%p\n", this);
3434 return this->size == 0;
3437 /* ?swap@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXAAV12@@Z */
3438 /* ?swap@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXAEAV12@@Z */
3439 DEFINE_THISCALL_WRAPPER(basic_string_wchar_swap, 8)
3440 void __thiscall basic_string_wchar_swap(basic_string_wchar *this, basic_string_wchar *str)
3442 basic_string_wchar tmp;
3443 TRACE("%p %p\n", this, str);
3450 /* ?substr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV12@II@Z */
3451 /* ?substr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV12@_K0@Z */
3452 DEFINE_THISCALL_WRAPPER(basic_string_wchar_substr, 16)
3453 basic_string_wchar* __thiscall basic_string_wchar_substr(basic_string_wchar *this,
3454 basic_string_wchar *ret, MSVCP_size_t off, MSVCP_size_t len)
3456 TRACE("%p %lu %lu\n", this, off, len);
3458 basic_string_wchar_ctor_substr_alloc(ret, this, off, len, NULL);
3462 /* ?copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPAGII@Z */
3463 /* ?copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEAG_K1@Z */
3464 DEFINE_THISCALL_WRAPPER(basic_string_wchar_copy, 16)
3465 MSVCP_size_t __thiscall basic_string_wchar_copy(const basic_string_wchar *this,
3466 wchar_t *dest, MSVCP_size_t count, MSVCP_size_t off)
3468 TRACE("%p %p %lu %lu\n", this, dest, count, off);
3470 if(off > this->size)
3472 if(count > this->size-off)
3473 count = this->size-off;
3474 char_traits_wchar__Copy_s(dest, count, this->ptr+off, count);
3478 /* ?get_allocator@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$allocator@G@2@XZ */
3479 /* ?get_allocator@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$allocator@G@2@XZ */
3480 DEFINE_THISCALL_WRAPPER(basic_string_wchar_get_allocator, 8)
3481 allocator* __thiscall basic_string_wchar_get_allocator(const basic_string_wchar *this, allocator *ret)
3483 TRACE("%p\n", this);