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)
157 basic_string_char__Eos(this, 0);
160 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEX_N@Z */
161 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAX_N@Z */
162 DEFINE_THISCALL_WRAPPER(basic_string_char__Tidy, 8)
163 void __thiscall basic_string_char__Tidy(basic_string_char *this, MSVCP_bool built)
165 TRACE("(%p %d)\n", this, built);
167 if(!this->ptr || !built);
168 else if(!this->ptr[-1] || (unsigned char)this->ptr[-1]==FROZEN)
169 MSVCP_allocator_char_deallocate(NULL, this->ptr-1, this->res+2);
173 memset(this, 0, sizeof(*this));
176 /* ?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAE_NI_N@Z */
177 /* ?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAA_N_K_N@Z */
178 DEFINE_THISCALL_WRAPPER(basic_string_char__Grow, 12)
179 MSVCP_bool __thiscall basic_string_char__Grow(basic_string_char *this, MSVCP_size_t new_size, MSVCP_bool trim)
183 basic_string_char__Tidy(this, TRUE);
185 basic_string_char__Eos(this, 0);
186 } else if(this->res<new_size || trim ||
187 (this->ptr && this->ptr[-1] && (unsigned char)this->ptr[-1]!=FROZEN)) {
188 MSVCP_size_t new_res = new_size, len = this->size;
191 if(!trim && this->ptr && !this->ptr[-1]) {
193 if(new_res/3 < this->res/2)
194 new_res = this->res + this->res/2;
197 ptr = MSVCP_allocator_char_allocate(this->allocator, new_res+2);
200 ptr = MSVCP_allocator_char_allocate(this->allocator, new_size+2);
203 ERR("Out of memory\n");
212 char_traits_char__Copy_s(ptr+1, new_size, this->ptr, len);
213 basic_string_char__Tidy(this, TRUE);
216 basic_string_char__Eos(this, len);
222 /* ?_Split@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXXZ */
223 /* ?_Split@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAXXZ */
224 DEFINE_THISCALL_WRAPPER(basic_string_char__Split, 4)
225 void __thiscall basic_string_char__Split(basic_string_char *this)
230 TRACE("(%p)\n", this);
232 if(!this->ptr || !this->ptr[-1] || (unsigned char)this->ptr[-1]==FROZEN)
237 basic_string_char__Tidy(this, TRUE);
238 if(basic_string_char__Grow(this, len, FALSE)) {
240 char_traits_char__Copy_s(this->ptr, this->res, ptr, len);
241 basic_string_char__Eos(this, len);
245 /* ?_Freeze@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXXZ */
246 /* ?_Freeze@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAXXZ */
247 DEFINE_THISCALL_WRAPPER(basic_string_char__Freeze, 4)
248 void __thiscall basic_string_char__Freeze(basic_string_char *this)
250 TRACE("(%p)\n", this);
251 basic_string_char__Split(this);
253 this->ptr[-1] = FROZEN;
256 /* ?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXI@Z */
257 /* ?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAX_K@Z */
258 DEFINE_THISCALL_WRAPPER(basic_string_char__Copy, 8)
259 void __thiscall basic_string_char__Copy(basic_string_char *this, MSVCP_size_t copy_len)
261 TRACE("%p %lu\n", this, copy_len);
263 if(!basic_string_char__Grow(this, copy_len, TRUE))
267 /* ?_Pdif@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAIPBD0@Z */
268 /* ?_Pdif@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CA_KPEBD0@Z */
269 MSVCP_size_t __cdecl basic_string_char__Pdif(const char *i1, const char *i2)
271 TRACE("(%p %p)\n", i1, i2);
272 return !i1 ? 0 : i1-i2;
275 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPADPADI@Z */
276 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEADPEAD_K@Z */
277 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPBDPBDI@Z */
278 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEBDPEBD_K@Z */
279 char* __cdecl basic_string_char__Psum(char *iter, MSVCP_size_t add)
281 TRACE("(%p %lu)\n", iter, add);
282 return iter ? iter+add : iter;
285 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z */
286 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0@Z */
287 DEFINE_THISCALL_WRAPPER(basic_string_char_erase, 12)
288 basic_string_char* __thiscall basic_string_char_erase(
289 basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t len)
291 TRACE("%p %lu %lu\n", this, pos, len);
296 if(len > this->size-pos)
297 len = this->size-pos;
300 basic_string_char__Split(this);
301 char_traits_char__Move_s(this->ptr+pos, this->res-pos,
302 this->ptr+pos+len, this->size-pos-len);
303 basic_string_char__Eos(this, this->size-len);
309 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPAD0@Z */
310 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEAD0@Z */
311 DEFINE_THISCALL_WRAPPER(basic_string_char_erase_iter, 12)
312 char* __thiscall basic_string_char_erase_iter(basic_string_char *this, char *beg, char *end)
314 MSVCP_size_t pos = basic_string_char__Pdif(beg, this->ptr);
315 basic_string_char_erase(this, pos, basic_string_char__Pdif(end, beg));
316 return basic_string_char__Psum(this->ptr, pos);
319 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPAD@Z */
320 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEAD@Z */
321 DEFINE_THISCALL_WRAPPER(basic_string_char_erase_beg, 8)
322 char* __thiscall basic_string_char_erase_beg(basic_string_char *this, char *beg)
324 MSVCP_size_t pos = beg-this->ptr;
325 basic_string_char_erase(this, pos, 1);
326 return this->ptr+pos;
329 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */
330 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
331 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_substr, 16)
332 basic_string_char* __thiscall basic_string_char_assign_substr(
333 basic_string_char *this, const basic_string_char *assign,
334 MSVCP_size_t pos, MSVCP_size_t len)
336 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
338 if(assign->size < pos)
341 if(len > assign->size-pos)
342 len = assign->size-pos;
345 basic_string_char_erase(this, pos+len, basic_string_char_npos);
346 basic_string_char_erase(this, 0, pos);
347 } else if(basic_string_char__Grow(this, len, FALSE)) {
349 char_traits_char__Copy_s(this->ptr, this->res, assign->ptr+pos, len);
350 basic_string_char__Eos(this, len);
356 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z */
357 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z */
358 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_cstr_len, 12)
359 basic_string_char* __thiscall basic_string_char_assign_cstr_len(
360 basic_string_char *this, const char *str, MSVCP_size_t len)
362 TRACE("%p %s %lu\n", this, debugstr_an(str, len), len);
364 if(basic_string_char_inside(this, str))
365 return basic_string_char_assign_substr(this, this, str-this->ptr, len);
366 else if(basic_string_char__Grow(this, len, FALSE)) {
367 char_traits_char__Copy_s(this->ptr, this->res, str, len);
368 basic_string_char__Eos(this, len);
374 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */
375 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */
376 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z */
377 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@AEBV01@@Z */
378 DEFINE_THISCALL_WRAPPER(basic_string_char_assign, 8)
379 basic_string_char* __thiscall basic_string_char_assign(
380 basic_string_char *this, const basic_string_char *assign)
382 return basic_string_char_assign_substr(this, assign,
383 0, basic_string_char_npos);
386 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z */
387 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD@Z */
388 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z */
389 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@PEBD@Z */
390 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_cstr, 8)
391 basic_string_char* __thiscall basic_string_char_assign_cstr(
392 basic_string_char *this, const char *str)
394 return basic_string_char_assign_cstr_len(this, str,
395 char_traits_char_length(str));
398 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@D@Z */
399 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@D@Z */
400 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_ch, 8)
401 basic_string_char* __thiscall basic_string_char_assign_ch(
402 basic_string_char *this, char ch)
404 return basic_string_char_assign_cstr_len(this, &ch, 1);
407 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */
408 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KD@Z */
409 DEFINE_THISCALL_WRAPPER(basic_string_char_assignn, 12)
410 basic_string_char* __thiscall basic_string_char_assignn(
411 basic_string_char *this, MSVCP_size_t count, char ch)
413 TRACE("%p %ld %c\n", this, count, ch);
415 basic_string_char__Grow(this, count, FALSE);
416 char_traits_char_assignn(this->ptr, count, ch);
417 basic_string_char__Eos(this, count);
421 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD0@Z */
422 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD0@Z */
423 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_ptr_ptr, 12)
424 basic_string_char* __thiscall basic_string_char_assign_ptr_ptr(
425 basic_string_char *this, const char *first, const char *last)
427 return basic_string_char_assign_cstr_len(this, first, last-first);
430 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDIABV?$allocator@D@1@@Z */
431 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD_KAEBV?$allocator@D@1@@Z */
432 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_cstr_len_alloc, 16)
433 basic_string_char* __thiscall basic_string_char_ctor_cstr_len_alloc(
434 basic_string_char *this, const char *str, MSVCP_size_t len, const void *alloc)
436 TRACE("%p %s %ld\n", this, debugstr_an(str, len), len);
438 basic_string_char__Tidy(this, FALSE);
439 basic_string_char_assign_cstr_len(this, str, len);
443 basic_string_char* basic_string_char_ctor_cstr_len(basic_string_char *this, const char *str, MSVCP_size_t len)
445 return basic_string_char_ctor_cstr_len_alloc(this, str, len, NULL);
448 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@IIABV?$allocator@D@1@@Z */
449 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@_K1AEBV?$allocator@D@1@@Z */
450 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_substr_alloc, 20)
451 basic_string_char* __thiscall basic_string_char_ctor_substr_alloc(
452 basic_string_char *this, const basic_string_char *assign,
453 MSVCP_size_t pos, MSVCP_size_t len, const void *alloc)
455 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
457 basic_string_char__Tidy(this, FALSE);
458 basic_string_char_assign_substr(this, assign, pos, len);
462 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDABV?$allocator@D@1@@Z */
463 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBDAEBV?$allocator@D@1@@Z */
464 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_cstr_alloc, 12)
465 basic_string_char* __thiscall basic_string_char_ctor_cstr_alloc(
466 basic_string_char *this, const char *str, const void *alloc)
468 TRACE("%p %s\n", this, debugstr_a(str));
470 basic_string_char__Tidy(this, FALSE);
471 basic_string_char_assign_cstr(this, str);
475 basic_string_char* basic_string_char_ctor_cstr(
476 basic_string_char *this, const char *str)
478 return basic_string_char_ctor_cstr_alloc(this, str, NULL);
481 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@IDABV?$allocator@D@1@@Z */
482 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@_KDAEBV?$allocator@D@1@@Z */
483 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_ch_alloc, 16)
484 basic_string_char* __thiscall basic_string_char_ctor_ch_alloc(basic_string_char *this,
485 MSVCP_size_t count, char ch, const void *alloc)
487 TRACE("%p %ld %c\n", this, count, ch);
489 basic_string_char__Tidy(this, FALSE);
490 basic_string_char_assignn(this, count, ch);
494 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD0ABV?$allocator@D@1@@Z */
495 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD0AEBV?$allocator@D@1@@Z */
496 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_iter, 16)
497 basic_string_char* __thiscall basic_string_char_ctor_iter(basic_string_char *this,
498 const char *first, const char *last, allocator *alloc)
500 TRACE("(%p %p %p %p)\n", this, first, last, alloc);
502 basic_string_char__Tidy(this, FALSE);
503 basic_string_char_assign_cstr_len(this, first, basic_string_char__Pdif(last, first));
507 /* ??_F?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
508 /* ??_F?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
509 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor, 4)
510 basic_string_char* __thiscall basic_string_char_ctor(basic_string_char *this)
514 basic_string_char__Tidy(this, FALSE);
518 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$allocator@D@1@@Z */
519 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV?$allocator@D@1@@Z */
520 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_alloc, 8)
521 basic_string_char* __thiscall basic_string_char_ctor_alloc(
522 basic_string_char *this, const void *alloc)
524 TRACE("%p %p\n", this, alloc);
526 basic_string_char__Tidy(this, FALSE);
530 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z */
531 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@@Z */
532 DEFINE_THISCALL_WRAPPER(basic_string_char_copy_ctor, 8)
533 basic_string_char* __thiscall basic_string_char_copy_ctor(
534 basic_string_char *this, const basic_string_char *copy)
536 TRACE("%p %p\n", this, copy);
538 basic_string_char__Tidy(this, FALSE);
539 basic_string_char_assign(this, copy);
543 /* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ */
544 /* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@XZ */
545 DEFINE_THISCALL_WRAPPER(basic_string_char_dtor, 4)
546 void __thiscall basic_string_char_dtor(basic_string_char *this)
549 basic_string_char__Tidy(this, TRUE);
552 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIPBDI@Z */
553 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0PEBD0@Z */
554 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_substr_cstr_len, 20)
555 int __thiscall basic_string_char_compare_substr_cstr_len(
556 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
557 const char *str, MSVCP_size_t count)
561 TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_an(str, count), count);
566 if(num > this->size-pos)
567 num = this->size-pos;
569 ans = char_traits_char_compare(this->ptr+pos,
570 str, num>count ? count : num);
581 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHPBD@Z */
582 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAHPEBD@Z */
583 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_cstr, 8)
584 int __thiscall basic_string_char_compare_cstr(
585 const basic_string_char *this, const char *str)
587 return basic_string_char_compare_substr_cstr_len(this, 0, this->size,
588 str, char_traits_char_length(str));
591 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIABV12@II@Z */
592 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0AEBV12@00@Z */
593 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_substr_substr, 24)
594 int __thiscall basic_string_char_compare_substr_substr(
595 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
596 const basic_string_char *compare, MSVCP_size_t off, MSVCP_size_t count)
598 TRACE("%p %lu %lu %p %lu %lu\n", this, pos, num, compare, off, count);
600 if(compare->size < off)
603 if(count > compare->size-off)
604 count = compare->size-off;
606 return basic_string_char_compare_substr_cstr_len(this, pos, num,
607 compare->ptr+off, count);
610 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIABV12@@Z */
611 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0AEBV12@@Z */
612 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_substr, 16)
613 int __thiscall basic_string_char_compare_substr(
614 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
615 const basic_string_char *compare)
617 return basic_string_char_compare_substr_cstr_len(this, pos, num,
618 compare->ptr, compare->size);
621 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHABV12@@Z */
622 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAHAEBV12@@Z */
623 DEFINE_THISCALL_WRAPPER(basic_string_char_compare, 8)
624 int __thiscall basic_string_char_compare(
625 const basic_string_char *this, const basic_string_char *compare)
627 return basic_string_char_compare_substr_cstr_len(this, 0, this->size,
628 compare->ptr, compare->size);
631 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIPBD@Z */
632 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0PEBD@Z */
633 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_substr_cstr, 16)
634 int __thiscall basic_string_char_compare_substr_cstr(const basic_string_char *this,
635 MSVCP_size_t pos, MSVCP_size_t num, const char *str)
637 return basic_string_char_compare_substr_cstr_len(this, pos, num,
638 str, char_traits_char_length(str));
641 /* ??$?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 */
642 /* ??$?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 */
643 /* ??8std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
644 /* ??8std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
645 MSVCP_bool __cdecl basic_string_char_equal(
646 const basic_string_char *left, const basic_string_char *right)
648 return basic_string_char_compare(left, right) == 0;
651 /* ??$?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 */
652 /* ??$?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 */
653 /* ??8std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
654 /* ??8std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
655 MSVCP_bool __cdecl basic_string_char_equal_str_cstr(
656 const basic_string_char *left, const char *right)
658 return basic_string_char_compare_cstr(left, right) == 0;
661 /* ??$?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 */
662 /* ??$?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 */
663 /* ??8std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
664 /* ??8std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
665 MSVCP_bool __cdecl basic_string_char_equal_cstr_str(
666 const char *left, const basic_string_char *right)
668 return basic_string_char_compare_cstr(right, left) == 0;
671 /* ??$?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 */
672 /* ??$?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 */
673 /* ??9std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
674 /* ??9std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
675 MSVCP_bool __cdecl basic_string_char_not_equal(
676 const basic_string_char *left, const basic_string_char *right)
678 return basic_string_char_compare(left, right) != 0;
681 /* ??$?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 */
682 /* ??$?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 */
683 /* ??9std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
684 /* ??9std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
685 MSVCP_bool __cdecl basic_string_char_not_equal_str_cstr(
686 const basic_string_char *left, const char *right)
688 return basic_string_char_compare_cstr(left, right) != 0;
691 /* ??$?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 */
692 /* ??$?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 */
693 /* ??9std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
694 /* ??9std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
695 MSVCP_bool __cdecl basic_string_char_not_equal_cstr_str(
696 const char *left, const basic_string_char *right)
698 return basic_string_char_compare_cstr(right, left) != 0;
701 /* ??$?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 */
702 /* ??$?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 */
703 /* ??Mstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
704 /* ??Mstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
705 MSVCP_bool __cdecl basic_string_char_lower(
706 const basic_string_char *left, const basic_string_char *right)
708 return basic_string_char_compare(left, right) < 0;
711 /* ??$?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 */
712 /* ??$?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 */
713 /* ??Mstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
714 /* ??Mstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
715 MSVCP_bool __cdecl basic_string_char_lower_bstr_cstr(
716 const basic_string_char *left, const char *right)
718 return basic_string_char_compare_cstr(left, right) < 0;
721 /* ??$?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 */
722 /* ??$?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 */
723 /* ??Mstd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
724 /* ??Mstd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
725 MSVCP_bool __cdecl basic_string_char_lower_cstr_bstr(
726 const char *left, const basic_string_char *right)
728 return basic_string_char_compare_cstr(right, left) > 0;
731 /* ??$?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 */
732 /* ??$?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 */
733 /* ??Nstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
734 /* ??Nstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
735 MSVCP_bool __cdecl basic_string_char_leq(
736 const basic_string_char *left, const basic_string_char *right)
738 return basic_string_char_compare(left, right) <= 0;
741 /* ??$?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 */
742 /* ??$?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 */
743 /* ??Nstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
744 /* ??Nstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
745 MSVCP_bool __cdecl basic_string_char_leq_bstr_cstr(
746 const basic_string_char *left, const char *right)
748 return basic_string_char_compare_cstr(left, right) <= 0;
751 /* ??$?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 */
752 /* ??$?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 */
753 /* ??Nstd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
754 /* ??Nstd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
755 MSVCP_bool __cdecl basic_string_char_leq_cstr_bstr(
756 const char *left, const basic_string_char *right)
758 return basic_string_char_compare_cstr(right, left) >= 0;
761 /* ??$?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 */
762 /* ??$?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 */
763 /* ??Ostd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
764 /* ??Ostd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
765 MSVCP_bool __cdecl basic_string_char_greater(
766 const basic_string_char *left, const basic_string_char *right)
768 return basic_string_char_compare(left, right) > 0;
771 /* ??$?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 */
772 /* ??$?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 */
773 /* ??Ostd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
774 /* ??Ostd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
775 MSVCP_bool __cdecl basic_string_char_greater_bstr_cstr(
776 const basic_string_char *left, const char *right)
778 return basic_string_char_compare_cstr(left, right) > 0;
781 /* ??$?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 */
782 /* ??$?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 */
783 /* ??Ostd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
784 /* ??Ostd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
785 MSVCP_bool __cdecl basic_string_char_greater_cstr_bstr(
786 const char *left, const basic_string_char *right)
788 return basic_string_char_compare_cstr(right, left) < 0;
791 /* ??$?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 */
792 /* ??$?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 */
793 /* ??Pstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
794 /* ??Pstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
795 MSVCP_bool __cdecl basic_string_char_geq(
796 const basic_string_char *left, const basic_string_char *right)
798 return basic_string_char_compare(left, right) >= 0;
801 /* ??$?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 */
802 /* ??$?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 */
803 /* ??Pstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
804 /* ??Pstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
805 MSVCP_bool __cdecl basic_string_char_geq_bstr_cstr(
806 const basic_string_char *left, const char *right)
808 return basic_string_char_compare_cstr(left, right) >= 0;
811 /* ??$?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 */
812 /* ??$?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 */
813 /* ??Pstd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
814 /* ??Pstd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
815 MSVCP_bool __cdecl basic_string_char_geq_cstr_bstr(
816 const char *left, const basic_string_char *right)
818 return basic_string_char_compare_cstr(right, left) <= 0;
821 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
822 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
823 DEFINE_THISCALL_WRAPPER(basic_string_char_find_cstr_substr, 16)
824 MSVCP_size_t __thiscall basic_string_char_find_cstr_substr(
825 const basic_string_char *this, const char *find, MSVCP_size_t pos, MSVCP_size_t len)
829 TRACE("%p %s %lu %lu\n", this, debugstr_an(find, len), pos, len);
831 if(len==0 && pos<=this->size)
833 if(pos>=this->size || len>this->size)
834 return basic_string_char_npos;
836 end = this->ptr+this->size-len+1;
837 for(p=this->ptr+pos; p<end; p++) {
838 p = char_traits_char_find(p, end-p, find);
842 if(!char_traits_char_compare(p, find, len))
846 return basic_string_char_npos;
849 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
850 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
851 DEFINE_THISCALL_WRAPPER(basic_string_char_find_off, 12)
852 MSVCP_size_t __thiscall basic_string_char_find_off(
853 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
855 return basic_string_char_find_cstr_substr(this, find->ptr, off, find->size);
858 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
859 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
860 DEFINE_THISCALL_WRAPPER(basic_string_char_find_ch, 12)
861 MSVCP_size_t __thiscall basic_string_char_find_ch(
862 const basic_string_char *this, char ch, MSVCP_size_t pos)
864 return basic_string_char_find_cstr_substr(this, &ch, pos, 1);
867 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
868 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
869 DEFINE_THISCALL_WRAPPER(basic_string_char_find_cstr_off, 12)
870 MSVCP_size_t __thiscall basic_string_char_find_cstr_off(
871 const basic_string_char *this, const char *find, MSVCP_size_t pos)
873 return basic_string_char_find_cstr_substr(this, find, pos,
874 char_traits_char_length(find));
877 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
878 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
879 DEFINE_THISCALL_WRAPPER(basic_string_char_rfind_cstr_substr, 16)
880 MSVCP_size_t __thiscall basic_string_char_rfind_cstr_substr(
881 const basic_string_char *this, const char *find, MSVCP_size_t pos, MSVCP_size_t len)
885 TRACE("%p %s %lu %lu\n", this, debugstr_an(find, len), pos, len);
888 return pos<this->size ? pos : this->size;
891 return basic_string_char_npos;
893 if(pos > this->size-len+1)
894 pos = this->size-len+1;
896 for(p=end+pos; p>=end; p--) {
897 if(*p==*find && !char_traits_char_compare(p, find, len))
901 return basic_string_char_npos;
904 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
905 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
906 DEFINE_THISCALL_WRAPPER(basic_string_char_rfind_off, 12)
907 MSVCP_size_t __thiscall basic_string_char_rfind_off(
908 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
910 return basic_string_char_rfind_cstr_substr(this, find->ptr, off, find->size);
913 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
914 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
915 DEFINE_THISCALL_WRAPPER(basic_string_char_rfind_ch, 12)
916 MSVCP_size_t __thiscall basic_string_char_rfind_ch(
917 const basic_string_char *this, char ch, MSVCP_size_t pos)
919 return basic_string_char_rfind_cstr_substr(this, &ch, pos, 1);
922 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
923 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
924 DEFINE_THISCALL_WRAPPER(basic_string_char_rfind_cstr_off, 12)
925 MSVCP_size_t __thiscall basic_string_char_rfind_cstr_off(
926 const basic_string_char *this, const char *find, MSVCP_size_t pos)
928 return basic_string_char_rfind_cstr_substr(this, find, pos,
929 char_traits_char_length(find));
932 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
933 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
934 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_not_of_cstr_substr, 16)
935 MSVCP_size_t __thiscall basic_string_char_find_first_not_of_cstr_substr(
936 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
940 TRACE("%p %p %lu %lu\n", this, find, off, len);
943 end = this->ptr+this->size;
944 for(p=this->ptr+off; p<end; p++)
945 if(!char_traits_char_find(find, len, p))
949 return basic_string_char_npos;
952 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
953 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
954 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_not_of, 12)
955 MSVCP_size_t __thiscall basic_string_char_find_first_not_of(
956 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
958 return basic_string_char_find_first_not_of_cstr_substr(this,
959 find->ptr, off, find->size);
962 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
963 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
964 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_not_of_ch, 12)
965 MSVCP_size_t __thiscall basic_string_char_find_first_not_of_ch(
966 const basic_string_char *this, char ch, MSVCP_size_t off)
968 return basic_string_char_find_first_not_of_cstr_substr(this, &ch, off, 1);
971 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
972 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
973 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_not_of_cstr, 12)
974 MSVCP_size_t __thiscall basic_string_char_find_first_not_of_cstr(
975 const basic_string_char *this, const char *find, MSVCP_size_t off)
977 return basic_string_char_find_first_not_of_cstr_substr(
978 this, find, off, char_traits_char_length(find));
981 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
982 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
983 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_of_cstr_substr, 16)
984 MSVCP_size_t __thiscall basic_string_char_find_first_of_cstr_substr(
985 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
989 TRACE("%p %p %lu %lu\n", this, find, off, len);
991 if(len>0 && off<this->size) {
992 end = this->ptr+this->size;
993 for(p=this->ptr+off; p<end; p++)
994 if(char_traits_char_find(find, len, p))
998 return basic_string_char_npos;
1001 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1002 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1003 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_of, 12)
1004 MSVCP_size_t __thiscall basic_string_char_find_first_of(
1005 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1007 return basic_string_char_find_first_of_cstr_substr(this,
1008 find->ptr, off, find->size);
1011 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1012 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1013 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_of_ch, 12)
1014 MSVCP_size_t __thiscall basic_string_char_find_first_of_ch(
1015 const basic_string_char *this, char ch, MSVCP_size_t off)
1017 return basic_string_char_find_first_of_cstr_substr(this, &ch, off, 1);
1020 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1021 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1022 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_of_cstr, 12)
1023 MSVCP_size_t __thiscall basic_string_char_find_first_of_cstr(
1024 const basic_string_char *this, const char *find, MSVCP_size_t off)
1026 return basic_string_char_find_first_of_cstr_substr(
1027 this, find, off, char_traits_char_length(find));
1030 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1031 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1032 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_not_of_cstr_substr, 16)
1033 MSVCP_size_t __thiscall basic_string_char_find_last_not_of_cstr_substr(
1034 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
1036 const char *p, *beg;
1038 TRACE("%p %p %lu %lu\n", this, find, off, len);
1040 if(len>0 && this->size>0) {
1041 if(off >= this->size)
1045 for(p=beg+off; p>=beg; p--)
1046 if(!char_traits_char_find(find, len, p))
1050 return basic_string_char_npos;
1053 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1054 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1055 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_not_of, 12)
1056 MSVCP_size_t __thiscall basic_string_char_find_last_not_of(
1057 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1059 return basic_string_char_find_last_not_of_cstr_substr(this,
1060 find->ptr, off, find->size);
1063 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1064 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1065 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_not_of_ch, 12)
1066 MSVCP_size_t __thiscall basic_string_char_find_last_not_of_ch(
1067 const basic_string_char *this, char ch, MSVCP_size_t off)
1069 return basic_string_char_find_last_not_of_cstr_substr(this, &ch, off, 1);
1072 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1073 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1074 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_not_of_cstr, 12)
1075 MSVCP_size_t __thiscall basic_string_char_find_last_not_of_cstr(
1076 const basic_string_char *this, const char *find, MSVCP_size_t off)
1078 return basic_string_char_find_last_not_of_cstr_substr(
1079 this, find, off, char_traits_char_length(find));
1082 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1083 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1084 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_of_cstr_substr, 16)
1085 MSVCP_size_t __thiscall basic_string_char_find_last_of_cstr_substr(
1086 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
1088 const char *p, *beg;
1090 TRACE("%p %p %lu %lu\n", this, find, off, len);
1092 if(len>0 && this->size>0) {
1093 if(off >= this->size)
1097 for(p=beg+off; p>=beg; p--)
1098 if(char_traits_char_find(find, len, p))
1102 return basic_string_char_npos;
1105 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1106 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1107 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_of, 12)
1108 MSVCP_size_t __thiscall basic_string_char_find_last_of(
1109 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1111 return basic_string_char_find_last_of_cstr_substr(this,
1112 find->ptr, off, find->size);
1115 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1116 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1117 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_of_ch, 12)
1118 MSVCP_size_t __thiscall basic_string_char_find_last_of_ch(
1119 const basic_string_char *this, char ch, MSVCP_size_t off)
1121 return basic_string_char_find_last_of_cstr_substr(this, &ch, off, 1);
1124 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1125 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1126 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_of_cstr, 12)
1127 MSVCP_size_t __thiscall basic_string_char_find_last_of_cstr(
1128 const basic_string_char *this, const char *find, MSVCP_size_t off)
1130 return basic_string_char_find_last_of_cstr_substr(
1131 this, find, off, char_traits_char_length(find));
1134 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */
1135 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
1136 DEFINE_THISCALL_WRAPPER(basic_string_char_append_substr, 16)
1137 basic_string_char* __thiscall basic_string_char_append_substr(basic_string_char *this,
1138 const basic_string_char *append, MSVCP_size_t offset, MSVCP_size_t count)
1140 TRACE("%p %p %lu %lu\n", this, append, offset, count);
1142 if(append->size < offset)
1145 if(count > append->size-offset)
1146 count = append->size-offset;
1148 if(basic_string_char_npos-this->size<=count || this->size+count<this->size)
1151 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1153 char_traits_char__Copy_s(this->ptr+this->size, this->res-this->size,
1154 append->ptr+offset, count);
1155 basic_string_char__Eos(this, this->size+count);
1161 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z */
1162 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z */
1163 DEFINE_THISCALL_WRAPPER(basic_string_char_append_cstr_len, 12)
1164 basic_string_char* __thiscall basic_string_char_append_cstr_len(
1165 basic_string_char *this, const char *append, MSVCP_size_t count)
1167 TRACE("%p %s %lu\n", this, debugstr_an(append, count), count);
1169 if(basic_string_char_inside(this, append))
1170 return basic_string_char_append_substr(this, this, append-this->ptr, count);
1172 if(basic_string_char_npos-this->size<=count || this->size+count<this->size)
1175 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1176 char_traits_char__Copy_s(this->ptr+this->size,
1177 this->res-this->size, append, count);
1178 basic_string_char__Eos(this, this->size+count);
1184 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */
1185 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KD@Z */
1186 DEFINE_THISCALL_WRAPPER(basic_string_char_append_len_ch, 12)
1187 basic_string_char* __thiscall basic_string_char_append_len_ch(
1188 basic_string_char *this, MSVCP_size_t count, char ch)
1190 TRACE("%p %lu %c\n", this, count, ch);
1192 if(basic_string_char_npos-this->size <= count)
1195 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1196 char_traits_char_assignn(this->ptr+this->size, count, ch);
1197 basic_string_char__Eos(this, this->size+count);
1203 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */
1204 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */
1205 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z */
1206 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@AEBV01@@Z */
1207 DEFINE_THISCALL_WRAPPER(basic_string_char_append, 8)
1208 basic_string_char* __thiscall basic_string_char_append(
1209 basic_string_char *this, const basic_string_char *append)
1211 return basic_string_char_append_substr(this, append,
1212 0, basic_string_char_npos);
1215 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@D@Z */
1216 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@D@Z */
1217 DEFINE_THISCALL_WRAPPER(basic_string_char_append_ch, 8)
1218 basic_string_char* __thiscall basic_string_char_append_ch(
1219 basic_string_char *this, char ch)
1221 return basic_string_char_append_len_ch(this, 1, ch);
1224 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD0@Z */
1225 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD0@Z */
1226 DEFINE_THISCALL_WRAPPER(basic_string_char_append_beg_end, 12)
1227 basic_string_char* __thiscall basic_string_char_append_beg_end(
1228 basic_string_char *this, const char *beg, const char *end)
1230 return basic_string_char_append_cstr_len(this, beg, end-beg);
1233 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z */
1234 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD@Z */
1235 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z */
1236 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@PEBD@Z */
1237 DEFINE_THISCALL_WRAPPER(basic_string_char_append_cstr, 8)
1238 basic_string_char* __thiscall basic_string_char_append_cstr(
1239 basic_string_char *this, const char *append)
1241 return basic_string_char_append_cstr_len(this, append,
1242 char_traits_char_length(append));
1244 /* ??$?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 */
1245 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@0@Z */
1246 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z */
1247 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@0@Z */
1248 basic_string_char* __cdecl basic_string_char_concatenate(basic_string_char *ret,
1249 const basic_string_char *left, const basic_string_char *right)
1251 TRACE("%p %p\n", left, right);
1253 basic_string_char_copy_ctor(ret, left);
1254 basic_string_char_append(ret, right);
1258 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@D@Z */
1259 /* ??$?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 */
1260 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@D@Z */
1261 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@D@Z */
1262 basic_string_char* __cdecl basic_string_char_concatenate_bstr_ch(basic_string_char *ret,
1263 const basic_string_char *left, char right)
1265 TRACE("%p %c\n", left, right);
1267 basic_string_char_copy_ctor(ret, left);
1268 basic_string_char_append_ch(ret, right);
1272 /* ??$?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 */
1273 /* ??$?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 */
1274 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z */
1275 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@PEBD@Z */
1276 basic_string_char* __cdecl basic_string_char_concatenate_bstr_cstr(basic_string_char *ret,
1277 const basic_string_char *left, const char *right)
1279 TRACE("%p %s\n", left, debugstr_a(right));
1281 basic_string_char_copy_ctor(ret, left);
1282 basic_string_char_append_cstr(ret, right);
1286 /* ??$?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 */
1287 /* ??$?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 */
1288 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DABV10@@Z */
1289 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DAEBV10@@Z */
1290 basic_string_char* __cdecl basic_string_char_concatenate_ch_bstr(basic_string_char *ret,
1291 char left, const basic_string_char *right)
1293 TRACE("%c %p\n", left, right);
1295 basic_string_char_ctor_cstr_len_alloc(ret, &left, 1, NULL);
1296 basic_string_char_append(ret, right);
1300 /* ??$?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 */
1301 /* ??$?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 */
1302 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z */
1303 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBDAEBV10@@Z */
1304 basic_string_char* __cdecl basic_string_char_concatenate_cstr_bstr(basic_string_char *ret,
1305 const char *left, const basic_string_char *right)
1307 TRACE("%s %p\n", debugstr_a(left), right);
1309 basic_string_char_ctor_cstr_alloc(ret, left, NULL);
1310 basic_string_char_append(ret, right);
1314 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */
1315 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */
1316 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */
1317 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */
1318 DEFINE_THISCALL_WRAPPER(basic_string_char_operator_at, 8)
1319 char* __thiscall basic_string_char_operator_at(
1320 basic_string_char *this, MSVCP_size_t pos)
1322 TRACE("%p %lu\n", this, pos);
1324 assert(this->size >= pos);
1325 return this->ptr+pos;
1328 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */
1329 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */
1330 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */
1331 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */
1332 DEFINE_THISCALL_WRAPPER(basic_string_char_at, 8)
1333 char* __thiscall basic_string_char_at(
1334 basic_string_char *this, MSVCP_size_t pos)
1336 TRACE("%p %lu\n", this, pos);
1338 if(this->size <= pos)
1341 return this->ptr+pos;
1344 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBDI@Z */
1345 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD0@Z */
1346 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_cstr_len, 20)
1347 basic_string_char* __thiscall basic_string_char_replace_cstr_len(basic_string_char *this,
1348 MSVCP_size_t off, MSVCP_size_t len, const char *str, MSVCP_size_t str_len)
1350 MSVCP_size_t inside_pos = -1;
1351 char *ptr = this->ptr;
1353 TRACE("%p %ld %ld %p %ld\n", this, off, len, str, str_len);
1355 if(this->size < off)
1358 if(len > this->size-off)
1359 len = this->size-off;
1361 if(basic_string_char_npos-str_len <= this->size-len)
1364 if(basic_string_char_inside(this, str))
1365 inside_pos = str-ptr;
1367 if(this->size-len+str_len)
1368 basic_string_char__Grow(this, this->size-len+str_len, FALSE);
1371 if(inside_pos == -1) {
1372 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1373 memcpy(ptr+off, str, str_len*sizeof(char));
1374 } else if(len >= str_len) {
1375 memmove(ptr+off, ptr+inside_pos, str_len*sizeof(char));
1376 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1380 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1382 if(inside_pos < off+len) {
1383 size = off+len-inside_pos;
1386 memmove(ptr+off, ptr+inside_pos, size*sizeof(char));
1392 memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(char));
1396 basic_string_char__Eos(this, this->size-len+str_len);
1400 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@II@Z */
1401 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0AEBV12@00@Z */
1402 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_substr, 24)
1403 basic_string_char* __thiscall basic_string_char_replace_substr(basic_string_char *this, MSVCP_size_t off,
1404 MSVCP_size_t len, const basic_string_char *str, MSVCP_size_t str_off, MSVCP_size_t str_len)
1406 if(str->size < str_off)
1409 if(str_len > str->size-str_off)
1410 str_len = str->size-str_off;
1412 return basic_string_char_replace_cstr_len(this, off, len,
1413 str->ptr+str_off, str_len);
1416 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@@Z */
1417 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0AEBV12@@Z */
1418 DEFINE_THISCALL_WRAPPER(basic_string_char_replace, 16)
1419 basic_string_char* __thiscall basic_string_char_replace(basic_string_char *this,
1420 MSVCP_size_t off, MSVCP_size_t len, const basic_string_char *str)
1422 return basic_string_char_replace_cstr_len(this, off, len,
1423 str->ptr, str->size);
1426 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIID@Z */
1427 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K00D@Z */
1428 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_ch, 20)
1429 basic_string_char* __thiscall basic_string_char_replace_ch(basic_string_char *this,
1430 MSVCP_size_t off, MSVCP_size_t len, MSVCP_size_t count, char ch)
1434 TRACE("%p %ld %ld %ld %c\n", this, off, len, count, ch);
1436 if(this->size < off)
1439 if(len > this->size-off)
1440 len = this->size-off;
1442 if(basic_string_char_npos-count <= this->size-len)
1445 if(this->size-len+count)
1446 basic_string_char__Grow(this, this->size-len+count, FALSE);
1449 memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(char));
1450 char_traits_char_assignn(ptr+off, count, ch);
1451 basic_string_char__Eos(this, this->size-len+count);
1456 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBD@Z */
1457 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD@Z */
1458 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_cstr, 16)
1459 basic_string_char* __thiscall basic_string_char_replace_cstr(basic_string_char *this,
1460 MSVCP_size_t off, MSVCP_size_t len, const char *str)
1462 return basic_string_char_replace_cstr_len(this, off, len, str,
1463 char_traits_char_length(str));
1466 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0ABV12@@Z */
1467 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0AEBV12@@Z */
1468 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_bstr, 16)
1469 basic_string_char* __thiscall basic_string_char_replace_iter_bstr(basic_string_char *this,
1470 char *beg, char *end, const basic_string_char *str)
1472 return basic_string_char_replace(this, basic_string_char__Pdif(beg, this->ptr),
1473 basic_string_char__Pdif(end, beg), str);
1476 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0ID@Z */
1477 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0_KD@Z */
1478 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_chn, 20)
1479 basic_string_char* __thiscall basic_string_char_replace_iter_chn(basic_string_char *this,
1480 char *beg, char *end, MSVCP_size_t count, char ch)
1482 return basic_string_char_replace_ch(this, basic_string_char__Pdif(beg, this->ptr),
1483 basic_string_char__Pdif(end, beg), count, ch);
1486 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBD1@Z */
1487 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD1@Z */
1488 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_iter, 20)
1489 basic_string_char* __thiscall basic_string_char_replace_iter_iter(basic_string_char *this,
1490 char *beg1, char *end1, const char *beg2, const char *end2)
1492 return basic_string_char_replace_cstr_len(this, basic_string_char__Pdif(beg1, this->ptr),
1493 basic_string_char__Pdif(end1, beg1), beg2, basic_string_char__Pdif(end2, beg2));
1496 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBD@Z */
1497 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD@Z */
1498 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr, 16)
1499 basic_string_char* __thiscall basic_string_char_replace_iter_cstr(basic_string_char *this,
1500 char *beg, char *end, const char *str)
1502 return basic_string_char_replace_cstr(this, basic_string_char__Pdif(beg, this->ptr),
1503 basic_string_char__Pdif(end, beg), str);
1506 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBDI@Z */
1507 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD_K@Z */
1508 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr_len, 20)
1509 basic_string_char* __thiscall basic_string_char_replace_iter_cstr_len(basic_string_char *this,
1510 char *beg, char *end, const char *str, MSVCP_size_t len)
1512 return basic_string_char_replace_cstr_len(this, basic_string_char__Pdif(beg, this->ptr),
1513 basic_string_char__Pdif(end, beg), str, len);
1516 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IABV12@@Z */
1517 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KAEBV12@@Z */
1518 DEFINE_THISCALL_WRAPPER(basic_string_char_insert, 12)
1519 basic_string_char* __thiscall basic_string_char_insert(basic_string_char *this,
1520 MSVCP_size_t off, const basic_string_char *str)
1522 return basic_string_char_replace(this, off, 0, str);
1525 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IABV12@II@Z */
1526 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KAEBV12@00@Z */
1527 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_substr, 20)
1528 basic_string_char* __thiscall basic_string_char_insert_substr(
1529 basic_string_char *this, MSVCP_size_t off, const basic_string_char *str,
1530 MSVCP_size_t str_off, MSVCP_size_t str_count)
1532 return basic_string_char_replace_substr(this, off, 0, str, str_off, str_count);
1535 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IPBD@Z */
1536 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KPEBD@Z */
1537 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_cstr, 12)
1538 basic_string_char* __thiscall basic_string_char_insert_cstr(
1539 basic_string_char *this, MSVCP_size_t off, const char *str)
1541 return basic_string_char_replace_cstr(this, off, 0, str);
1544 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IPBDI@Z */
1545 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KPEBD0@Z */
1546 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_cstr_len, 16)
1547 basic_string_char* __thiscall basic_string_char_insert_cstr_len(basic_string_char *this,
1548 MSVCP_size_t off, const char *str, MSVCP_size_t str_len)
1550 return basic_string_char_replace_cstr_len(this, off, 0, str, str_len);
1553 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IID@Z */
1554 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0D@Z */
1555 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_chn, 16)
1556 basic_string_char* __thiscall basic_string_char_insert_chn(basic_string_char *this,
1557 MSVCP_size_t off, MSVCP_size_t count, char ch)
1559 return basic_string_char_replace_ch(this, off, 0, count, ch);
1562 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPADD@Z */
1563 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEADD@Z */
1564 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter_ch, 12)
1565 char* __thiscall basic_string_char_insert_iter_ch(basic_string_char *this, char *pos, char ch)
1567 MSVCP_size_t off = basic_string_char__Pdif(pos, this->ptr);
1568 basic_string_char_insert_chn(this, off, 1, ch);
1569 return basic_string_char__Psum(this->ptr, off);
1572 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXPADID@Z */
1573 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXPEAD_KD@Z */
1574 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter_chn, 16)
1575 void __thiscall basic_string_char_insert_iter_chn(basic_string_char *this,
1576 char *pos, MSVCP_size_t n, char ch)
1578 basic_string_char_insert_chn(this, basic_string_char__Pdif(pos, this->ptr), n, ch);
1581 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXPADPBD1@Z */
1582 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXPEADPEBD1@Z */
1583 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter, 16)
1584 void __thiscall basic_string_char_insert_iter(basic_string_char *this,
1585 char *pos, const char *beg, const char *end)
1587 basic_string_char_insert_cstr_len(this, basic_string_char__Pdif(pos, this->ptr),
1588 beg, basic_string_char__Pdif(end, beg));
1591 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXID@Z */
1592 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_KD@Z */
1593 DEFINE_THISCALL_WRAPPER(basic_string_char_resize_ch, 12)
1594 void __thiscall basic_string_char_resize_ch(
1595 basic_string_char *this, MSVCP_size_t size, char ch)
1597 TRACE("%p %lu %c\n", this, size, ch);
1599 if(size <= this->size)
1600 basic_string_char_erase(this, size, this->size);
1602 basic_string_char_append_len_ch(this, size-this->size, ch);
1605 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z */
1606 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z */
1607 DEFINE_THISCALL_WRAPPER(basic_string_char_resize, 8)
1608 void __thiscall basic_string_char_resize(
1609 basic_string_char *this, MSVCP_size_t size)
1611 basic_string_char_resize_ch(this, size, '\0');
1614 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADXZ */
1615 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADXZ */
1616 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1617 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1618 DEFINE_THISCALL_WRAPPER(basic_string_char_begin, 4)
1619 char* __thiscall basic_string_char_begin(basic_string_char *this)
1621 TRACE("(%p)\n", this);
1622 basic_string_char__Freeze(this);
1626 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADXZ */
1627 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADXZ */
1628 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1629 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1630 DEFINE_THISCALL_WRAPPER(basic_string_char_end, 4)
1631 char* __thiscall basic_string_char_end(basic_string_char *this)
1633 TRACE("(%p)\n", this);
1634 basic_string_char__Freeze(this);
1635 return this->ptr+this->size;
1638 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@PADDAADPADH@2@XZ */
1639 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@PEADDAEADPEAD_J@2@XZ */
1640 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@PBDDABDPBDH@2@XZ */
1641 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@PEBDDAEBDPEBD_J@2@XZ */
1642 DEFINE_THISCALL_WRAPPER(basic_string_char_rbegin, 8)
1643 String_reverse_iterator_char* __thiscall basic_string_char_rbegin(
1644 basic_string_char *this, String_reverse_iterator_char *ret)
1646 TRACE("(%p %p)\n", this, ret);
1647 ret->ptr = basic_string_char_end(this);
1651 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@PADDAADPADH@2@XZ */
1652 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@PEADDAEADPEAD_J@2@XZ */
1653 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@PBDDABDPBDH@2@XZ */
1654 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@PEBDDAEBDPEBD_J@2@XZ */
1655 DEFINE_THISCALL_WRAPPER(basic_string_char_rend, 8)
1656 String_reverse_iterator_char* __thiscall basic_string_char_rend(
1657 basic_string_char *this, String_reverse_iterator_char *ret)
1659 TRACE("(%p %p)\n", this, ret);
1660 ret->ptr = basic_string_char_begin(this);
1664 /* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1665 /* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1666 /* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1667 /* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1668 DEFINE_THISCALL_WRAPPER(basic_string_char_c_str, 4)
1669 const char* __thiscall basic_string_char_c_str(const basic_string_char *this)
1671 TRACE("%p\n", this);
1672 return this->ptr ? this->ptr : basic_string_char__Nullstr();
1675 /* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1676 /* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1677 /* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1678 /* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1679 DEFINE_THISCALL_WRAPPER(basic_string_char_length, 4)
1680 MSVCP_size_t __thiscall basic_string_char_length(const basic_string_char *this)
1682 TRACE("%p\n", this);
1686 /* ?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1687 /* ?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1688 DEFINE_THISCALL_WRAPPER(basic_string_char_max_size, 4)
1689 MSVCP_size_t __thiscall basic_string_char_max_size(const basic_string_char *this)
1691 TRACE("%p\n", this);
1692 return MSVCP_allocator_char_max_size(NULL)-1;
1695 /* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1696 /* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1697 DEFINE_THISCALL_WRAPPER(basic_string_char_capacity, 4)
1698 MSVCP_size_t __thiscall basic_string_char_capacity(basic_string_char *this)
1700 TRACE("%p\n", this);
1704 /* ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z */
1705 /* ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z */
1706 DEFINE_THISCALL_WRAPPER(basic_string_char_reserve, 8)
1707 void __thiscall basic_string_char_reserve(basic_string_char *this, MSVCP_size_t size)
1711 TRACE("%p %ld\n", this, size);
1717 basic_string_char__Grow(this, size, FALSE);
1718 basic_string_char__Eos(this, len);
1721 /* ?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE_NXZ */
1722 /* ?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_NXZ */
1723 DEFINE_THISCALL_WRAPPER(basic_string_char_empty, 4)
1724 MSVCP_bool __thiscall basic_string_char_empty(basic_string_char *this)
1726 TRACE("%p\n", this);
1727 return this->size == 0;
1730 /* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXAAV12@@Z */
1731 /* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEAV12@@Z */
1732 DEFINE_THISCALL_WRAPPER(basic_string_char_swap, 8)
1733 void __thiscall basic_string_char_swap(basic_string_char *this, basic_string_char *str)
1735 basic_string_char tmp;
1736 TRACE("%p %p\n", this, str);
1743 /* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV12@II@Z */
1744 /* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV12@_K0@Z */
1745 DEFINE_THISCALL_WRAPPER(basic_string_char_substr, 16)
1746 basic_string_char* __thiscall basic_string_char_substr(basic_string_char *this,
1747 basic_string_char *ret, MSVCP_size_t off, MSVCP_size_t len)
1749 TRACE("%p %lu %lu\n", this, off, len);
1751 basic_string_char_ctor_substr_alloc(ret, this, off, len, NULL);
1755 /* ?copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPADII@Z */
1756 /* ?copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEAD_K1@Z */
1757 DEFINE_THISCALL_WRAPPER(basic_string_char_copy, 16)
1758 MSVCP_size_t __thiscall basic_string_char_copy(const basic_string_char *this,
1759 char *dest, MSVCP_size_t count, MSVCP_size_t off)
1761 TRACE("%p %p %lu %lu\n", this, dest, count, off);
1763 if(off > this->size)
1765 if(count > this->size-off)
1766 count = this->size-off;
1768 char_traits_char__Copy_s(dest, count, this->ptr+off, count);
1772 /* ?get_allocator@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$allocator@D@2@XZ */
1773 /* ?get_allocator@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$allocator@D@2@XZ */
1774 DEFINE_THISCALL_WRAPPER(basic_string_char_get_allocator, 8)
1775 allocator* __thiscall basic_string_char_get_allocator(const basic_string_char *this, allocator *ret)
1777 TRACE("%p\n", this);
1781 static wchar_t* char_traits_wchar__Move_s(wchar_t *dest,
1782 MSVCP_size_t size, const wchar_t *src, MSVCP_size_t count)
1784 if(!dest || !src || size<count) {
1787 _invalid_parameter(NULL, NULL, NULL, 0, 0);
1791 return memmove(dest, src, count * sizeof(WCHAR));
1794 static wchar_t* char_traits_wchar__Copy_s(wchar_t *dest,
1795 MSVCP_size_t size, const wchar_t *src, MSVCP_size_t count)
1797 if(!dest || !src || size<count) {
1800 _invalid_parameter(NULL, NULL, NULL, 0, 0);
1804 return memcpy(dest, src, count * sizeof(wchar_t));
1807 static MSVCP_size_t char_traits_wchar_length(const wchar_t *str)
1809 return wcslen((WCHAR*)str);
1812 static wchar_t* char_traits_wchar_assignn(wchar_t *str, MSVCP_size_t num, wchar_t c)
1814 return memset(str, c, num);
1817 static int char_traits_wchar_compare(const wchar_t *s1,
1818 const wchar_t *s2, MSVCP_size_t count)
1820 int ret = memcmp(s1, s2, count);
1821 return (ret>0 ? 1 : (ret<0 ? -1 : 0));
1824 static const wchar_t* char_traits_wchar_find(const wchar_t *str,
1825 MSVCP_size_t range, const wchar_t *c)
1827 return memchr(str, *c, range);
1830 static MSVCP_bool basic_string_wchar_inside(
1831 basic_string_wchar *this, const wchar_t *ptr)
1833 return ptr>=this->ptr && ptr<this->ptr+this->size;
1836 /* ?npos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@2IB */
1837 /* ?npos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@2_KB */
1838 const MSVCP_size_t basic_string_wchar_npos = -1;
1840 /* ?_C@?1??_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGXZ@4GB */
1841 /* ?_C@?1??_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGXZ@4GB */
1842 const wchar_t basic_string_wchar_nullbyte = '\0';
1844 /* ?_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGXZ */
1845 /* ?_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGXZ */
1846 const wchar_t* __cdecl basic_string_wchar__Nullstr(void)
1848 return &basic_string_wchar_nullbyte;
1851 /* ?_Refcnt@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEAAEPBG@Z */
1852 /* ?_Refcnt@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAAEAEPEBG@Z */
1853 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Refcnt, 8)
1854 unsigned short* __thiscall basic_string_wchar__Refcnt(basic_string_wchar *this, const wchar_t *ptr)
1856 TRACE("(%p %p)\n", this, ptr);
1857 return (unsigned short*)ptr-1;
1860 /* ?_Eos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXI@Z */
1861 /* ?_Eos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_K@Z */
1862 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Eos, 8)
1863 void __thiscall basic_string_wchar__Eos(basic_string_wchar *this, MSVCP_size_t len)
1869 void basic_string_wchar_clear(basic_string_wchar *this)
1872 basic_string_wchar__Eos(this, 0);
1875 /* ?_Tidy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEX_N@Z */
1876 /* ?_Tidy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_N@Z */
1877 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Tidy, 8)
1878 void __thiscall basic_string_wchar__Tidy(basic_string_wchar *this, MSVCP_bool built)
1880 TRACE("(%p %d)\n", this, built);
1882 if(!this->ptr || !built);
1883 else if(!this->ptr[-1] || (unsigned short)this->ptr[-1]==FROZEN)
1884 MSVCP_allocator_wchar_deallocate(NULL, this->ptr-1, this->res+2);
1888 memset(this, 0, sizeof(*this));
1891 /* ?_Grow@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAE_NI_N@Z */
1892 /* ?_Grow@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAA_N_K_N@Z */
1893 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Grow, 12)
1894 MSVCP_bool __thiscall basic_string_wchar__Grow(basic_string_wchar *this, MSVCP_size_t new_size, MSVCP_bool trim)
1898 basic_string_wchar__Tidy(this, TRUE);
1900 basic_string_wchar__Eos(this, 0);
1901 } else if(this->res<new_size || trim ||
1902 (this->ptr && this->ptr[-1] && (unsigned short)this->ptr[-1]!=FROZEN)) {
1903 MSVCP_size_t new_res = new_size, len = this->size;
1906 if(!trim && this->ptr && !this->ptr[-1]) {
1908 if(new_res/3 < this->res/2)
1909 new_res = this->res + this->res/2;
1912 ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_res+2);
1915 ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_size+2);
1918 ERR("Out of memory\n");
1927 char_traits_wchar__Copy_s(ptr+1, new_size, this->ptr, len);
1928 basic_string_wchar__Tidy(this, TRUE);
1930 this->res = new_res;
1931 basic_string_wchar__Eos(this, len);
1937 /* ?_Split@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXXZ */
1938 /* ?_Split@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAXXZ */
1939 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Split, 4)
1940 void __thiscall basic_string_wchar__Split(basic_string_wchar *this)
1945 TRACE("(%p)\n", this);
1947 if(!this->ptr || !this->ptr[-1] || (unsigned short)this->ptr[-1]==FROZEN)
1952 basic_string_wchar__Tidy(this, TRUE);
1953 if(basic_string_wchar__Grow(this, len, FALSE)) {
1955 char_traits_wchar__Copy_s(this->ptr, this->res, ptr, len);
1956 basic_string_wchar__Eos(this, len);
1960 /* ?_Freeze@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXXZ */
1961 /* ?_Freeze@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAXXZ */
1962 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Freeze, 4)
1963 void __thiscall basic_string_wchar__Freeze(basic_string_wchar *this)
1965 TRACE("(%p)\n", this);
1966 basic_string_wchar__Split(this);
1968 this->ptr[-1] = FROZEN;
1971 /* ?_Copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXI@Z */
1972 /* ?_Copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_K@Z */
1973 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Copy, 8)
1974 void __thiscall basic_string_wchar__Copy(basic_string_wchar *this, MSVCP_size_t copy_len)
1976 TRACE("%p %lu\n", this, copy_len);
1978 if(!basic_string_wchar__Grow(this, copy_len, TRUE))
1982 /* ?_Pdif@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAIPBG0@Z */
1983 /* ?_Pdif@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CA_KPEBG0@Z */
1984 MSVCP_size_t __cdecl basic_string_wchar__Pdif(const wchar_t *i1, const wchar_t *i2)
1986 TRACE("(%p %p)\n", i1, i2);
1987 return !i1 ? 0 : i1-i2;
1990 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPAGPAGI@Z */
1991 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEAGPEAG_K@Z */
1992 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGPBGI@Z */
1993 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGPEBG_K@Z */
1994 wchar_t* __cdecl basic_string_wchar__Psum(wchar_t *iter, MSVCP_size_t add)
1996 TRACE("(%p %lu)\n", iter, add);
1997 return iter ? iter+add : iter;
2000 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@II@Z */
2001 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0@Z */
2002 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase, 12)
2003 basic_string_wchar* __thiscall basic_string_wchar_erase(
2004 basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t len)
2006 TRACE("%p %lu %lu\n", this, pos, len);
2008 if(pos > this->size)
2011 if(len > this->size-pos)
2012 len = this->size-pos;
2015 basic_string_wchar__Split(this);
2016 char_traits_wchar__Move_s(this->ptr+pos, this->res-pos,
2017 this->ptr+pos+len, this->size-pos-len);
2018 basic_string_wchar__Eos(this, this->size-len);
2024 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAG0@Z */
2025 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAG0@Z */
2026 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase_iter, 12)
2027 wchar_t* __thiscall basic_string_wchar_erase_iter(basic_string_wchar *this, wchar_t *beg, wchar_t *end)
2029 MSVCP_size_t pos = basic_string_wchar__Pdif(beg, this->ptr);
2030 basic_string_wchar_erase(this, pos, basic_string_wchar__Pdif(end, beg));
2031 return basic_string_wchar__Psum(this->ptr, pos);
2034 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAG@Z */
2035 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAG@Z */
2036 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase_beg, 8)
2037 wchar_t* __thiscall basic_string_wchar_erase_beg(basic_string_wchar *this, wchar_t *beg)
2039 MSVCP_size_t pos = beg-this->ptr;
2040 basic_string_wchar_erase(this, pos, 1);
2041 return this->ptr+pos;
2044 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@II@Z */
2045 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
2046 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_substr, 16)
2047 basic_string_wchar* __thiscall basic_string_wchar_assign_substr(
2048 basic_string_wchar *this, const basic_string_wchar *assign,
2049 MSVCP_size_t pos, MSVCP_size_t len)
2051 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
2053 if(assign->size < pos)
2056 if(len > assign->size-pos)
2057 len = assign->size-pos;
2059 if(this == assign) {
2060 basic_string_wchar_erase(this, pos+len, basic_string_wchar_npos);
2061 basic_string_wchar_erase(this, 0, pos);
2062 } else if(basic_string_wchar__Grow(this, len, FALSE)) {
2064 char_traits_wchar__Copy_s(this->ptr, this->res,
2065 assign->ptr+pos, len);
2066 basic_string_wchar__Eos(this, len);
2072 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBGI@Z */
2073 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG_K@Z */
2074 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_cstr_len, 12)
2075 basic_string_wchar* __thiscall basic_string_wchar_assign_cstr_len(
2076 basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
2078 TRACE("%p %s %lu\n", this, debugstr_wn(str, len), len);
2080 if(basic_string_wchar_inside(this, str))
2081 return basic_string_wchar_assign_substr(this, this, str-this->ptr, len);
2082 else if(basic_string_wchar__Grow(this, len, FALSE)) {
2083 char_traits_wchar__Copy_s(this->ptr, this->res, str, len);
2084 basic_string_wchar__Eos(this, len);
2090 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@@Z */
2091 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@@Z */
2092 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@ABV01@@Z */
2093 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@AEBV01@@Z */
2094 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign, 8)
2095 basic_string_wchar* __thiscall basic_string_wchar_assign(
2096 basic_string_wchar *this, const basic_string_wchar *assign)
2098 return basic_string_wchar_assign_substr(this, assign,
2099 0, basic_string_wchar_npos);
2102 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG@Z */
2103 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG@Z */
2104 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@PBG@Z */
2105 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@PEBG@Z */
2106 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_cstr, 8)
2107 basic_string_wchar* __thiscall basic_string_wchar_assign_cstr(
2108 basic_string_wchar *this, const wchar_t *str)
2110 return basic_string_wchar_assign_cstr_len(this, str,
2111 char_traits_wchar_length(str));
2114 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@G@Z */
2115 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@G@Z */
2116 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_ch, 8)
2117 basic_string_wchar* __thiscall basic_string_wchar_assign_ch(
2118 basic_string_wchar *this, wchar_t ch)
2120 return basic_string_wchar_assign_cstr_len(this, &ch, 1);
2123 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IG@Z */
2124 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KG@Z */
2125 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assignn, 12)
2126 basic_string_wchar* __thiscall basic_string_wchar_assignn(
2127 basic_string_wchar *this, MSVCP_size_t count, wchar_t ch)
2129 TRACE("%p %ld %c\n", this, count, ch);
2131 basic_string_wchar__Grow(this, count, FALSE);
2132 char_traits_wchar_assignn(this->ptr, count, ch);
2133 basic_string_wchar__Eos(this, count);
2137 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG0@Z */
2138 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG0@Z */
2139 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_ptr_ptr, 12)
2140 basic_string_wchar* __thiscall basic_string_wchar_assign_ptr_ptr(
2141 basic_string_wchar *this, const wchar_t *first, const wchar_t *last)
2143 return basic_string_wchar_assign_cstr_len(this, first, last-first);
2146 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBGIABV?$allocator@G@1@@Z */
2147 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG_KAEBV?$allocator@G@1@@Z */
2148 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_cstr_len_alloc, 16)
2149 basic_string_wchar* __thiscall basic_string_wchar_ctor_cstr_len_alloc(
2150 basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len, const void *alloc)
2152 TRACE("%p %s %ld\n", this, debugstr_wn(str, len), len);
2154 basic_string_wchar__Tidy(this, FALSE);
2155 basic_string_wchar_assign_cstr_len(this, str, len);
2159 basic_string_wchar* basic_string_wchar_ctor_cstr_len(basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
2161 return basic_string_wchar_ctor_cstr_len_alloc(this, str, len, NULL);
2164 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV01@IIABV?$allocator@G@1@@Z */
2165 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV01@_K1AEBV?$allocator@G@1@@Z */
2166 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_substr_alloc, 20)
2167 basic_string_wchar* __thiscall basic_string_wchar_ctor_substr_alloc(
2168 basic_string_wchar *this, const basic_string_wchar *assign,
2169 MSVCP_size_t pos, MSVCP_size_t len, const void *alloc)
2171 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
2173 basic_string_wchar__Tidy(this, FALSE);
2174 basic_string_wchar_assign_substr(this, assign, pos, len);
2178 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBGABV?$allocator@G@1@@Z */
2179 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBGAEBV?$allocator@G@1@@Z */
2180 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_cstr_alloc, 12)
2181 basic_string_wchar* __thiscall basic_string_wchar_ctor_cstr_alloc(
2182 basic_string_wchar *this, const wchar_t *str, const void *alloc)
2184 TRACE("%p %s\n", this, debugstr_w(str));
2186 basic_string_wchar__Tidy(this, FALSE);
2187 basic_string_wchar_assign_cstr(this, str);
2191 basic_string_wchar* basic_string_wchar_ctor_cstr(basic_string_wchar *this, const wchar_t *str)
2193 return basic_string_wchar_ctor_cstr_alloc(this, str, NULL);
2196 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@IGABV?$allocator@G@1@@Z */
2197 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@_KGAEBV?$allocator@G@1@@Z */
2198 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_ch_alloc, 16)
2199 basic_string_wchar* __thiscall basic_string_wchar_ctor_ch_alloc(basic_string_wchar *this,
2200 MSVCP_size_t count, wchar_t ch, const void *alloc)
2202 TRACE("%p %ld %c\n", this, count, ch);
2204 basic_string_wchar__Tidy(this, FALSE);
2205 basic_string_wchar_assignn(this, count, ch);
2209 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBG0ABV?$allocator@G@1@@Z */
2210 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG0AEBV?$allocator@G@1@@Z */
2211 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_iter, 16)
2212 basic_string_wchar* __thiscall basic_string_wchar_ctor_iter(basic_string_wchar *this,
2213 const wchar_t *first, const wchar_t *last, allocator *alloc)
2215 TRACE("(%p %p %p %p)\n", this, first, last, alloc);
2217 basic_string_wchar__Tidy(this, FALSE);
2218 basic_string_wchar_assign_cstr_len(this, first, basic_string_wchar__Pdif(last, first));
2222 /* ??_F?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
2223 /* ??_F?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
2224 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor, 4)
2225 basic_string_wchar* __thiscall basic_string_wchar_ctor(basic_string_wchar *this)
2227 TRACE("%p\n", this);
2229 basic_string_wchar__Tidy(this, FALSE);
2233 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$allocator@G@1@@Z */
2234 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV?$allocator@G@1@@Z */
2235 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_alloc, 8)
2236 basic_string_wchar* __thiscall basic_string_wchar_ctor_alloc(
2237 basic_string_wchar *this, const void *alloc)
2239 TRACE("%p %p\n", this, alloc);
2241 basic_string_wchar__Tidy(this, FALSE);
2245 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV01@@Z */
2246 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV01@@Z */
2247 DEFINE_THISCALL_WRAPPER(basic_string_wchar_copy_ctor, 8)
2248 basic_string_wchar* __thiscall basic_string_wchar_copy_ctor(
2249 basic_string_wchar *this, const basic_string_wchar *copy)
2251 TRACE("%p %p\n", this, copy);
2253 basic_string_wchar__Tidy(this, FALSE);
2254 basic_string_wchar_assign(this, copy);
2258 /* ??1?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@XZ */
2259 /* ??1?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@XZ */
2260 DEFINE_THISCALL_WRAPPER(basic_string_wchar_dtor, 4)
2261 void __thiscall basic_string_wchar_dtor(basic_string_wchar *this)
2263 TRACE("%p\n", this);
2264 basic_string_wchar__Tidy(this, TRUE);
2267 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIPBGI@Z */
2268 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0PEBG0@Z */
2269 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr_cstr_len, 20)
2270 int __thiscall basic_string_wchar_compare_substr_cstr_len(
2271 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2272 const wchar_t *str, MSVCP_size_t count)
2276 TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_wn(str, count), count);
2278 if(this->size < pos)
2281 if(num > this->size-pos)
2282 num = this->size-pos;
2284 ans = char_traits_wchar_compare(this->ptr+pos,
2285 str, num>count ? count : num);
2291 else if(num < count)
2296 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHPBG@Z */
2297 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAHPEBG@Z */
2298 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_cstr, 8)
2299 int __thiscall basic_string_wchar_compare_cstr(
2300 const basic_string_wchar *this, const wchar_t *str)
2302 return basic_string_wchar_compare_substr_cstr_len(this, 0, this->size,
2303 str, char_traits_wchar_length(str));
2306 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIABV12@II@Z */
2307 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0AEBV12@00@Z */
2308 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr_substr, 24)
2309 int __thiscall basic_string_wchar_compare_substr_substr(
2310 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2311 const basic_string_wchar *compare, MSVCP_size_t off, MSVCP_size_t count)
2313 TRACE("%p %lu %lu %p %lu %lu\n", this, pos, num, compare, off, count);
2315 if(compare->size < off)
2318 if(count > compare->size-off)
2319 count = compare->size-off;
2321 return basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2322 compare->ptr+off, count);
2325 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIABV12@@Z */
2326 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0AEBV12@@Z */
2327 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr, 16)
2328 int __thiscall basic_string_wchar_compare_substr(
2329 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2330 const basic_string_wchar *compare)
2332 return basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2333 compare->ptr, compare->size);
2336 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHABV12@@Z */
2337 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAHAEBV12@@Z */
2338 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare, 8)
2339 int __thiscall basic_string_wchar_compare(
2340 const basic_string_wchar *this, const basic_string_wchar *compare)
2342 return basic_string_wchar_compare_substr_cstr_len(this, 0, this->size,
2343 compare->ptr, compare->size);
2346 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIPBG@Z */
2347 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0PEBG@Z */
2348 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr_cstr, 16)
2349 int __thiscall basic_string_wchar_compare_substr_cstr(const basic_string_wchar *this,
2350 MSVCP_size_t pos, MSVCP_size_t num, const wchar_t *str)
2352 return basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2353 str, char_traits_wchar_length(str));
2356 /* ??$?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 */
2357 /* ??$?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 */
2358 /* ??8std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2359 /* ??8std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2360 MSVCP_bool __cdecl basic_string_wchar_equal(
2361 const basic_string_wchar *left, const basic_string_wchar *right)
2363 return basic_string_wchar_compare(left, right) == 0;
2366 /* ??$?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 */
2367 /* ??$?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 */
2368 /* ??8std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2369 /* ??8std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2370 MSVCP_bool __cdecl basic_string_wchar_equal_str_cstr(
2371 const basic_string_wchar *left, const wchar_t *right)
2373 return basic_string_wchar_compare_cstr(left, right) == 0;
2376 /* ??$?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 */
2377 /* ??$?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 */
2378 /* ??8std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2379 /* ??8std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2380 MSVCP_bool __cdecl basic_string_wchar_equal_cstr_str(
2381 const wchar_t *left, const basic_string_wchar *right)
2383 return basic_string_wchar_compare_cstr(right, left) == 0;
2386 /* ??$?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 */
2387 /* ??$?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 */
2388 /* ??9std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2389 /* ??9std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2390 MSVCP_bool __cdecl basic_string_wchar_not_equal(
2391 const basic_string_wchar *left, const basic_string_wchar *right)
2393 return basic_string_wchar_compare(left, right) != 0;
2396 /* ??$?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 */
2397 /* ??$?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 */
2398 /* ??9std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2399 /* ??9std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2400 MSVCP_bool __cdecl basic_string_wchar_not_equal_str_cstr(
2401 const basic_string_wchar *left, const wchar_t *right)
2403 return basic_string_wchar_compare_cstr(left, right) != 0;
2406 /* ??$?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 */
2407 /* ??$?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 */
2408 /* ??9std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2409 /* ??9std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2410 MSVCP_bool __cdecl basic_string_wchar_not_equal_cstr_str(
2411 const wchar_t *left, const basic_string_wchar *right)
2413 return basic_string_wchar_compare_cstr(right, left) != 0;
2416 /* ??$?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 */
2417 /* ??$?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 */
2418 /* ??Mstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2419 /* ??Mstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2420 MSVCP_bool __cdecl basic_string_wchar_lower(
2421 const basic_string_wchar *left, const basic_string_wchar *right)
2423 return basic_string_wchar_compare(left, right) < 0;
2426 /* ??$?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 */
2427 /* ??$?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 */
2428 /* ??Mstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2429 /* ??Mstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2430 MSVCP_bool __cdecl basic_string_wchar_lower_bstr_cstr(
2431 const basic_string_wchar *left, const wchar_t *right)
2433 return basic_string_wchar_compare_cstr(left, right) < 0;
2436 /* ??$?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 */
2437 /* ??$?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 */
2438 /* ??Mstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2439 /* ??Mstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2440 MSVCP_bool __cdecl basic_string_wchar_lower_cstr_bstr(
2441 const wchar_t *left, const basic_string_wchar *right)
2443 return basic_string_wchar_compare_cstr(right, left) > 0;
2446 /* ??$?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 */
2447 /* ??$?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 */
2448 /* ??Nstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2449 /* ??Nstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2450 MSVCP_bool __cdecl basic_string_wchar_leq(
2451 const basic_string_wchar *left, const basic_string_wchar *right)
2453 return basic_string_wchar_compare(left, right) <= 0;
2456 /* ??$?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 */
2457 /* ??$?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 */
2458 /* ??Nstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2459 /* ??Nstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2460 MSVCP_bool __cdecl basic_string_wchar_leq_bstr_cstr(
2461 const basic_string_wchar *left, const wchar_t *right)
2463 return basic_string_wchar_compare_cstr(left, right) <= 0;
2466 /* ??$?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 */
2467 /* ??$?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 */
2468 /* ??Nstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2469 /* ??Nstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2470 MSVCP_bool __cdecl basic_string_wchar_leq_cstr_bstr(
2471 const wchar_t *left, const basic_string_wchar *right)
2473 return basic_string_wchar_compare_cstr(right, left) >= 0;
2476 /* ??$?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 */
2477 /* ??$?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 */
2478 /* ??Ostd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2479 /* ??Ostd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2480 MSVCP_bool __cdecl basic_string_wchar_greater(
2481 const basic_string_wchar *left, const basic_string_wchar *right)
2483 return basic_string_wchar_compare(left, right) > 0;
2486 /* ??$?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 */
2487 /* ??$?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 */
2488 /* ??Ostd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2489 /* ??Ostd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2490 MSVCP_bool __cdecl basic_string_wchar_greater_bstr_cstr(
2491 const basic_string_wchar *left, const wchar_t *right)
2493 return basic_string_wchar_compare_cstr(left, right) > 0;
2496 /* ??$?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 */
2497 /* ??$?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 */
2498 /* ??Ostd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2499 /* ??Ostd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2500 MSVCP_bool __cdecl basic_string_wchar_greater_cstr_bstr(
2501 const wchar_t *left, const basic_string_wchar *right)
2503 return basic_string_wchar_compare_cstr(right, left) < 0;
2506 /* ??$?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 */
2507 /* ??$?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 */
2508 /* ??Pstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2509 /* ??Pstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2510 MSVCP_bool __cdecl basic_string_wchar_geq(
2511 const basic_string_wchar *left, const basic_string_wchar *right)
2513 return basic_string_wchar_compare(left, right) >= 0;
2516 /* ??$?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 */
2517 /* ??$?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 */
2518 /* ??Pstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2519 /* ??Pstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2520 MSVCP_bool __cdecl basic_string_wchar_geq_bstr_cstr(
2521 const basic_string_wchar *left, const wchar_t *right)
2523 return basic_string_wchar_compare_cstr(left, right) >= 0;
2526 /* ??$?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 */
2527 /* ??$?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 */
2528 /* ??Pstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2529 /* ??Pstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2530 MSVCP_bool __cdecl basic_string_wchar_geq_cstr_bstr(
2531 const wchar_t *left, const basic_string_wchar *right)
2533 return basic_string_wchar_compare_cstr(right, left) <= 0;
2536 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2537 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2538 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_cstr_substr, 16)
2539 MSVCP_size_t __thiscall basic_string_wchar_find_cstr_substr(
2540 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos, MSVCP_size_t len)
2542 const wchar_t *p, *end;
2544 TRACE("%p %s %lu %lu\n", this, debugstr_wn(find, len), pos, len);
2546 if(len==0 && pos<=this->size)
2548 if(pos>=this->size || len>this->size)
2549 return basic_string_wchar_npos;
2551 end = this->ptr+this->size-len+1;
2552 for(p=this->ptr+pos; p<end; p++) {
2553 p = char_traits_wchar_find(p, end-p, find);
2557 if(!char_traits_wchar_compare(p, find, len))
2561 return basic_string_wchar_npos;
2564 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2565 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2566 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_off, 12)
2567 MSVCP_size_t __thiscall basic_string_wchar_find_off(
2568 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2570 return basic_string_wchar_find_cstr_substr(this, find->ptr, off, find->size);
2573 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2574 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2575 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_ch, 12)
2576 MSVCP_size_t __thiscall basic_string_wchar_find_ch(
2577 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t pos)
2579 return basic_string_wchar_find_cstr_substr(this, &ch, pos, 1);
2582 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2583 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2584 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_cstr_off, 12)
2585 MSVCP_size_t __thiscall basic_string_wchar_find_cstr_off(
2586 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos)
2588 return basic_string_wchar_find_cstr_substr(this, find, pos,
2589 char_traits_wchar_length(find));
2592 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2593 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2594 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_cstr_substr, 16)
2595 MSVCP_size_t __thiscall basic_string_wchar_rfind_cstr_substr(
2596 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos, MSVCP_size_t len)
2598 const wchar_t *p, *end;
2600 TRACE("%p %s %lu %lu\n", this, debugstr_wn(find, len), pos, len);
2603 return pos<this->size ? pos : this->size;
2605 if(len > this->size)
2606 return basic_string_wchar_npos;
2608 if(pos > this->size-len+1)
2609 pos = this->size-len+1;
2611 for(p=end+pos; p>=end; p--) {
2612 if(*p==*find && !char_traits_wchar_compare(p, find, len))
2616 return basic_string_wchar_npos;
2619 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2620 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2621 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_off, 12)
2622 MSVCP_size_t __thiscall basic_string_wchar_rfind_off(
2623 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2625 return basic_string_wchar_rfind_cstr_substr(this, find->ptr, off, find->size);
2628 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2629 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2630 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_ch, 12)
2631 MSVCP_size_t __thiscall basic_string_wchar_rfind_ch(
2632 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t pos)
2634 return basic_string_wchar_rfind_cstr_substr(this, &ch, pos, 1);
2637 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2638 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2639 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_cstr_off, 12)
2640 MSVCP_size_t __thiscall basic_string_wchar_rfind_cstr_off(
2641 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos)
2643 return basic_string_wchar_rfind_cstr_substr(this, find, pos,
2644 char_traits_wchar_length(find));
2647 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2648 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2649 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of_cstr_substr, 16)
2650 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of_cstr_substr(
2651 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2653 const wchar_t *p, *end;
2655 TRACE("%p %p %lu %lu\n", this, find, off, len);
2657 if(off<this->size) {
2658 end = this->ptr+this->size;
2659 for(p=this->ptr+off; p<end; p++)
2660 if(!char_traits_wchar_find(find, len, p))
2664 return basic_string_wchar_npos;
2667 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2668 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2669 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of, 12)
2670 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of(
2671 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2673 return basic_string_wchar_find_first_not_of_cstr_substr(this,
2674 find->ptr, off, find->size);
2677 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2678 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2679 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of_ch, 12)
2680 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of_ch(
2681 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2683 return basic_string_wchar_find_first_not_of_cstr_substr(this, &ch, off, 1);
2686 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2687 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2688 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of_cstr, 12)
2689 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of_cstr(
2690 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2692 return basic_string_wchar_find_first_not_of_cstr_substr(
2693 this, find, off, char_traits_wchar_length(find));
2696 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2697 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2698 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of_cstr_substr, 16)
2699 MSVCP_size_t __thiscall basic_string_wchar_find_first_of_cstr_substr(
2700 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2702 const wchar_t *p, *end;
2704 TRACE("%p %p %lu %lu\n", this, find, off, len);
2706 if(len>0 && off<this->size) {
2707 end = this->ptr+this->size;
2708 for(p=this->ptr+off; p<end; p++)
2709 if(char_traits_wchar_find(find, len, p))
2713 return basic_string_wchar_npos;
2716 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2717 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2718 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of, 12)
2719 MSVCP_size_t __thiscall basic_string_wchar_find_first_of(
2720 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2722 return basic_string_wchar_find_first_of_cstr_substr(this,
2723 find->ptr, off, find->size);
2726 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2727 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2728 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of_ch, 12)
2729 MSVCP_size_t __thiscall basic_string_wchar_find_first_of_ch(
2730 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2732 return basic_string_wchar_find_first_of_cstr_substr(this, &ch, off, 1);
2735 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2736 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2737 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of_cstr, 12)
2738 MSVCP_size_t __thiscall basic_string_wchar_find_first_of_cstr(
2739 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2741 return basic_string_wchar_find_first_of_cstr_substr(
2742 this, find, off, char_traits_wchar_length(find));
2745 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2746 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2747 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of_cstr_substr, 16)
2748 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of_cstr_substr(
2749 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2751 const wchar_t *p, *beg;
2753 TRACE("%p %p %lu %lu\n", this, find, off, len);
2755 if(len>0 && this->size>0) {
2756 if(off >= this->size)
2760 for(p=beg+off; p>=beg; p--)
2761 if(!char_traits_wchar_find(find, len, p))
2765 return basic_string_wchar_npos;
2768 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2769 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2770 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of, 12)
2771 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of(
2772 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2774 return basic_string_wchar_find_last_not_of_cstr_substr(this,
2775 find->ptr, off, find->size);
2778 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2779 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2780 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of_ch, 12)
2781 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of_ch(
2782 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2784 return basic_string_wchar_find_last_not_of_cstr_substr(this, &ch, off, 1);
2787 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2788 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2789 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of_cstr, 12)
2790 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of_cstr(
2791 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2793 return basic_string_wchar_find_last_not_of_cstr_substr(
2794 this, find, off, char_traits_wchar_length(find));
2797 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2798 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2799 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of_cstr_substr, 16)
2800 MSVCP_size_t __thiscall basic_string_wchar_find_last_of_cstr_substr(
2801 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2803 const wchar_t *p, *beg;
2805 TRACE("%p %p %lu %lu\n", this, find, off, len);
2807 if(len>0 && this->size>0) {
2808 if(off >= this->size)
2812 for(p=beg+off; p>=beg; p--)
2813 if(char_traits_wchar_find(find, len, p))
2817 return basic_string_wchar_npos;
2820 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2821 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2822 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of, 12)
2823 MSVCP_size_t __thiscall basic_string_wchar_find_last_of(
2824 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2826 return basic_string_wchar_find_last_of_cstr_substr(this,
2827 find->ptr, off, find->size);
2830 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2831 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2832 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of_ch, 12)
2833 MSVCP_size_t __thiscall basic_string_wchar_find_last_of_ch(
2834 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2836 return basic_string_wchar_find_last_of_cstr_substr(this, &ch, off, 1);
2839 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2840 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2841 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of_cstr, 12)
2842 MSVCP_size_t __thiscall basic_string_wchar_find_last_of_cstr(
2843 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2845 return basic_string_wchar_find_last_of_cstr_substr(
2846 this, find, off, char_traits_wchar_length(find));
2849 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@II@Z */
2850 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
2851 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_substr, 16)
2852 basic_string_wchar* __thiscall basic_string_wchar_append_substr(basic_string_wchar *this,
2853 const basic_string_wchar *append, MSVCP_size_t offset, MSVCP_size_t count)
2855 TRACE("%p %p %lu %lu\n", this, append, offset, count);
2857 if(append->size < offset)
2860 if(count > append->size-offset)
2861 count = append->size-offset;
2863 if(basic_string_wchar_npos-this->size<=count || this->size+count<this->size)
2866 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2868 char_traits_wchar__Copy_s(this->ptr+this->size, this->res-this->size,
2869 append->ptr+offset, count);
2870 basic_string_wchar__Eos(this, this->size+count);
2876 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBGI@Z */
2877 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG_K@Z */
2878 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_cstr_len, 12)
2879 basic_string_wchar* __thiscall basic_string_wchar_append_cstr_len(
2880 basic_string_wchar *this, const wchar_t *append, MSVCP_size_t count)
2882 TRACE("%p %s %lu\n", this, debugstr_wn(append, count), count);
2884 if(basic_string_wchar_inside(this, append))
2885 return basic_string_wchar_append_substr(this, this, append-this->ptr, count);
2887 if(basic_string_wchar_npos-this->size<=count || this->size+count<this->size)
2890 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2891 char_traits_wchar__Copy_s(this->ptr+this->size,
2892 this->res-this->size, append, count);
2893 basic_string_wchar__Eos(this, this->size+count);
2899 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IG@Z */
2900 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KG@Z */
2901 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_len_ch, 12)
2902 basic_string_wchar* __thiscall basic_string_wchar_append_len_ch(
2903 basic_string_wchar *this, MSVCP_size_t count, wchar_t ch)
2905 TRACE("%p %lu %c\n", this, count, ch);
2907 if(basic_string_wchar_npos-this->size <= count)
2910 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2911 char_traits_wchar_assignn(this->ptr+this->size, count, ch);
2912 basic_string_wchar__Eos(this, this->size+count);
2918 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@@Z */
2919 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@@Z */
2920 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@ABV01@@Z */
2921 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@AEBV01@@Z */
2922 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append, 8)
2923 basic_string_wchar* __thiscall basic_string_wchar_append(
2924 basic_string_wchar *this, const basic_string_wchar *append)
2926 return basic_string_wchar_append_substr(this, append,
2927 0, basic_string_wchar_npos);
2930 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@G@Z */
2931 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@G@Z */
2932 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_ch, 8)
2933 basic_string_wchar* __thiscall basic_string_wchar_append_ch(
2934 basic_string_wchar *this, wchar_t ch)
2936 return basic_string_wchar_append_len_ch(this, 1, ch);
2939 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG0@Z */
2940 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG0@Z */
2941 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_beg_end, 12)
2942 basic_string_wchar* __thiscall basic_string_wchar_append_beg_end(
2943 basic_string_wchar *this, const wchar_t *beg, const wchar_t *end)
2945 return basic_string_wchar_append_cstr_len(this, beg, end-beg);
2948 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG@Z */
2949 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG@Z */
2950 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@PBG@Z */
2951 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@PEBG@Z */
2952 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_cstr, 8)
2953 basic_string_wchar* __thiscall basic_string_wchar_append_cstr(
2954 basic_string_wchar *this, const wchar_t *append)
2956 return basic_string_wchar_append_cstr_len(this, append,
2957 char_traits_wchar_length(append));
2959 /* ??$?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 */
2960 /* ??$?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 */
2961 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@0@Z */
2962 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@0@Z */
2963 basic_string_wchar* __cdecl basic_string_wchar_concatenate(basic_string_wchar *ret,
2964 const basic_string_wchar *left, const basic_string_wchar *right)
2966 TRACE("%p %p\n", left, right);
2968 basic_string_wchar_copy_ctor(ret, left);
2969 basic_string_wchar_append(ret, right);
2973 /* ??$?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 */
2974 /* ??$?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 */
2975 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@G@Z */
2976 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@G@Z */
2977 basic_string_wchar* __cdecl basic_string_wchar_concatenate_bstr_ch(basic_string_wchar *ret,
2978 const basic_string_wchar *left, wchar_t right)
2980 TRACE("%p %c\n", left, right);
2982 basic_string_wchar_copy_ctor(ret, left);
2983 basic_string_wchar_append_ch(ret, right);
2987 /* ??$?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 */
2988 /* ??$?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 */
2989 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@PBG@Z */
2990 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@PEBG@Z */
2991 basic_string_wchar* __cdecl basic_string_wchar_concatenate_bstr_cstr(basic_string_wchar *ret,
2992 const basic_string_wchar *left, const wchar_t *right)
2994 TRACE("%p %s\n", left, debugstr_w(right));
2996 basic_string_wchar_copy_ctor(ret, left);
2997 basic_string_wchar_append_cstr(ret, right);
3001 /* ??$?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 */
3002 /* ??$?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 */
3003 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GABV10@@Z */
3004 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GAEBV10@@Z */
3005 basic_string_wchar* __cdecl basic_string_wchar_concatenate_ch_bstr(basic_string_wchar *ret,
3006 wchar_t left, const basic_string_wchar *right)
3008 TRACE("%c %p\n", left, right);
3010 basic_string_wchar_ctor_cstr_len_alloc(ret, &left, 1, NULL);
3011 basic_string_wchar_append(ret, right);
3015 /* ??$?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 */
3016 /* ??$?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 */
3017 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBGABV10@@Z */
3018 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBGAEBV10@@Z */
3019 basic_string_wchar* __cdecl basic_string_wchar_concatenate_cstr_bstr(basic_string_wchar *ret,
3020 const wchar_t *left, const basic_string_wchar *right)
3022 TRACE("%s %p\n", debugstr_w(left), right);
3024 basic_string_wchar_ctor_cstr_alloc(ret, left, NULL);
3025 basic_string_wchar_append(ret, right);
3029 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGI@Z */
3030 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAG_K@Z */
3031 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEABGI@Z */
3032 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAAEBG_K@Z */
3033 DEFINE_THISCALL_WRAPPER(basic_string_wchar_operator_at, 8)
3034 wchar_t* __thiscall basic_string_wchar_operator_at(
3035 basic_string_wchar *this, MSVCP_size_t pos)
3037 TRACE("%p %lu\n", this, pos);
3039 assert(this->size >= pos);
3040 return this->ptr+pos;
3043 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGI@Z */
3044 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAG_K@Z */
3045 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEABGI@Z */
3046 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAAEBG_K@Z */
3047 DEFINE_THISCALL_WRAPPER(basic_string_wchar_at, 8)
3048 wchar_t* __thiscall basic_string_wchar_at(
3049 basic_string_wchar *this, MSVCP_size_t pos)
3051 TRACE("%p %lu\n", this, pos);
3053 if(this->size <= pos)
3056 return this->ptr+pos;
3059 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIPBGI@Z */
3060 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG0@Z */
3061 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_cstr_len, 20)
3062 basic_string_wchar* __thiscall basic_string_wchar_replace_cstr_len(basic_string_wchar *this,
3063 MSVCP_size_t off, MSVCP_size_t len, const wchar_t *str, MSVCP_size_t str_len)
3065 MSVCP_size_t inside_pos = -1;
3066 wchar_t *ptr = this->ptr;
3068 TRACE("%p %ld %ld %p %ld\n", this, off, len, str, str_len);
3070 if(this->size < off)
3073 if(len > this->size-off)
3074 len = this->size-off;
3076 if(basic_string_wchar_npos-str_len <= this->size-len)
3079 if(basic_string_wchar_inside(this, str))
3080 inside_pos = str-ptr;
3082 if(this->size-len+str_len)
3083 basic_string_wchar__Grow(this, this->size-len+str_len, FALSE);
3086 if(inside_pos == -1) {
3087 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3088 memcpy(ptr+off, str, str_len*sizeof(char));
3089 } else if(len >= str_len) {
3090 memmove(ptr+off, ptr+inside_pos, str_len*sizeof(char));
3091 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3095 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3097 if(inside_pos < off+len) {
3098 size = off+len-inside_pos;
3101 memmove(ptr+off, ptr+inside_pos, size*sizeof(char));
3107 memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(char));
3111 basic_string_wchar__Eos(this, this->size-len+str_len);
3115 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@II@Z */
3116 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0AEBV12@00@Z */
3117 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_substr, 24)
3118 basic_string_wchar* __thiscall basic_string_wchar_replace_substr(basic_string_wchar *this, MSVCP_size_t off,
3119 MSVCP_size_t len, const basic_string_wchar *str, MSVCP_size_t str_off, MSVCP_size_t str_len)
3121 if(str->size < str_off)
3124 if(str_len > str->size-str_off)
3125 str_len = str->size-str_off;
3127 return basic_string_wchar_replace_cstr_len(this, off, len,
3128 str->ptr+str_off, str_len);
3131 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@@Z */
3132 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0AEBV12@@Z */
3133 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace, 16)
3134 basic_string_wchar* __thiscall basic_string_wchar_replace(basic_string_wchar *this,
3135 MSVCP_size_t off, MSVCP_size_t len, const basic_string_wchar *str)
3137 return basic_string_wchar_replace_cstr_len(this, off, len,
3138 str->ptr, str->size);
3141 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIIG@Z */
3142 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K00G@Z */
3143 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_ch, 20)
3144 basic_string_wchar* __thiscall basic_string_wchar_replace_ch(basic_string_wchar *this,
3145 MSVCP_size_t off, MSVCP_size_t len, MSVCP_size_t count, wchar_t ch)
3149 TRACE("%p %ld %ld %ld %c\n", this, off, len, count, ch);
3151 if(this->size < off)
3154 if(len > this->size-off)
3155 len = this->size-off;
3157 if(basic_string_wchar_npos-count <= this->size-len)
3160 if(this->size-len+count)
3161 basic_string_wchar__Grow(this, this->size-len+count, FALSE);
3164 memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(char));
3165 char_traits_wchar_assignn(ptr+off, count, ch);
3166 basic_string_wchar__Eos(this, this->size-len+count);
3171 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIPBG@Z */
3172 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG@Z */
3173 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_cstr, 16)
3174 basic_string_wchar* __thiscall basic_string_wchar_replace_cstr(basic_string_wchar *this,
3175 MSVCP_size_t off, MSVCP_size_t len, const wchar_t *str)
3177 return basic_string_wchar_replace_cstr_len(this, off, len, str,
3178 char_traits_wchar_length(str));
3181 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0ABV12@@Z */
3182 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0AEBV12@@Z */
3183 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_bstr, 16)
3184 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_bstr(basic_string_wchar *this,
3185 wchar_t *beg, wchar_t *end, const basic_string_wchar *str)
3187 return basic_string_wchar_replace(this, basic_string_wchar__Pdif(beg, this->ptr),
3188 basic_string_wchar__Pdif(end, beg), str);
3191 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0IG@Z */
3192 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0_KG@Z */
3193 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_chn, 20)
3194 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_chn(basic_string_wchar *this,
3195 wchar_t *beg, wchar_t *end, MSVCP_size_t count, wchar_t ch)
3197 return basic_string_wchar_replace_ch(this, basic_string_wchar__Pdif(beg, this->ptr),
3198 basic_string_wchar__Pdif(end, beg), count, ch);
3201 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBG1@Z */
3202 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG1@Z */
3203 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_iter, 20)
3204 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_iter(basic_string_wchar *this,
3205 wchar_t *beg1, wchar_t *end1, const wchar_t *beg2, const wchar_t *end2)
3207 return basic_string_wchar_replace_cstr_len(this, basic_string_wchar__Pdif(beg1, this->ptr),
3208 basic_string_wchar__Pdif(end1, beg1), beg2, basic_string_wchar__Pdif(end2, beg2));
3211 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBG@Z */
3212 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG@Z */
3213 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr, 16)
3214 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr(basic_string_wchar *this,
3215 wchar_t *beg, wchar_t *end, const wchar_t *str)
3217 return basic_string_wchar_replace_cstr(this, basic_string_wchar__Pdif(beg, this->ptr),
3218 basic_string_wchar__Pdif(end, beg), str);
3221 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBGI@Z */
3222 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG_K@Z */
3223 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr_len, 20)
3224 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr_len(basic_string_wchar *this,
3225 wchar_t *beg, wchar_t *end, const wchar_t *str, MSVCP_size_t len)
3227 return basic_string_wchar_replace_cstr_len(this, basic_string_wchar__Pdif(beg, this->ptr),
3228 basic_string_wchar__Pdif(end, beg), str, len);
3231 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IABV12@@Z */
3232 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KAEBV12@@Z */
3233 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert, 12)
3234 basic_string_wchar* __thiscall basic_string_wchar_insert(basic_string_wchar *this,
3235 MSVCP_size_t off, const basic_string_wchar *str)
3237 return basic_string_wchar_replace(this, off, 0, str);
3240 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IABV12@II@Z */
3241 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KAEBV12@00@Z */
3242 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_substr, 20)
3243 basic_string_wchar* __thiscall basic_string_wchar_insert_substr(
3244 basic_string_wchar *this, MSVCP_size_t off, const basic_string_wchar *str,
3245 MSVCP_size_t str_off, MSVCP_size_t str_count)
3247 return basic_string_wchar_replace_substr(this, off, 0, str, str_off, str_count);
3250 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IPBG@Z */
3251 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KPEBG@Z */
3252 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_cstr, 12)
3253 basic_string_wchar* __thiscall basic_string_wchar_insert_cstr(
3254 basic_string_wchar *this, MSVCP_size_t off, const wchar_t *str)
3256 return basic_string_wchar_replace_cstr(this, off, 0, str);
3259 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IPBGI@Z */
3260 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KPEBG0@Z */
3261 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_cstr_len, 16)
3262 basic_string_wchar* __thiscall basic_string_wchar_insert_cstr_len(basic_string_wchar *this,
3263 MSVCP_size_t off, const wchar_t *str, MSVCP_size_t str_len)
3265 return basic_string_wchar_replace_cstr_len(this, off, 0, str, str_len);
3268 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIG@Z */
3269 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0G@Z */
3270 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_chn, 16)
3271 basic_string_wchar* __thiscall basic_string_wchar_insert_chn(basic_string_wchar *this,
3272 MSVCP_size_t off, MSVCP_size_t count, wchar_t ch)
3274 return basic_string_wchar_replace_ch(this, off, 0, count, ch);
3277 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAGG@Z */
3278 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAGG@Z */
3279 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter_ch, 12)
3280 wchar_t* __thiscall basic_string_wchar_insert_iter_ch(basic_string_wchar *this, wchar_t *pos, wchar_t ch)
3282 MSVCP_size_t off = basic_string_wchar__Pdif(pos, this->ptr);
3283 basic_string_wchar_insert_chn(this, off, 1, ch);
3284 return basic_string_wchar__Psum(this->ptr, off);
3287 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXPAGIG@Z */
3288 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXPEAG_KG@Z */
3289 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter_chn, 16)
3290 void __thiscall basic_string_wchar_insert_iter_chn(basic_string_wchar *this,
3291 wchar_t *pos, MSVCP_size_t n, wchar_t ch)
3293 basic_string_wchar_insert_chn(this, basic_string_wchar__Pdif(pos, this->ptr), n, ch);
3296 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXPAGPBG1@Z */
3297 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXPEAGPEBG1@Z */
3298 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter, 16)
3299 void __thiscall basic_string_wchar_insert_iter(basic_string_wchar *this,
3300 wchar_t *pos, const wchar_t *beg, const wchar_t *end)
3302 basic_string_wchar_insert_cstr_len(this, basic_string_wchar__Pdif(pos, this->ptr),
3303 beg, basic_string_wchar__Pdif(end, beg));
3306 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXIG@Z */
3307 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_KG@Z */
3308 DEFINE_THISCALL_WRAPPER(basic_string_wchar_resize_ch, 12)
3309 void __thiscall basic_string_wchar_resize_ch(
3310 basic_string_wchar *this, MSVCP_size_t size, wchar_t ch)
3312 TRACE("%p %lu %c\n", this, size, ch);
3314 if(size <= this->size)
3315 basic_string_wchar_erase(this, size, this->size);
3317 basic_string_wchar_append_len_ch(this, size-this->size, ch);
3320 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXI@Z */
3321 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_K@Z */
3322 DEFINE_THISCALL_WRAPPER(basic_string_wchar_resize, 8)
3323 void __thiscall basic_string_wchar_resize(
3324 basic_string_wchar *this, MSVCP_size_t size)
3326 basic_string_wchar_resize_ch(this, size, '\0');
3329 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGXZ */
3330 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGXZ */
3331 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3332 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3333 DEFINE_THISCALL_WRAPPER(basic_string_wchar_begin, 4)
3334 wchar_t* __thiscall basic_string_wchar_begin(basic_string_wchar *this)
3336 TRACE("(%p)\n", this);
3337 basic_string_wchar__Freeze(this);
3341 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGXZ */
3342 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGXZ */
3343 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3344 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3345 DEFINE_THISCALL_WRAPPER(basic_string_wchar_end, 4)
3346 wchar_t* __thiscall basic_string_wchar_end(basic_string_wchar *this)
3348 TRACE("(%p)\n", this);
3349 basic_string_wchar__Freeze(this);
3350 return this->ptr+this->size;
3353 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@PAGGAAGPAGH@2@XZ */
3354 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@PEAGGAEAGPEAG_J@2@XZ */
3355 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@PBGGABGPBGH@2@XZ */
3356 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@PEBGGAEBGPEBG_J@2@XZ */
3357 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rbegin, 8)
3358 String_reverse_iterator_wchar* __thiscall basic_string_wchar_rbegin(
3359 basic_string_wchar *this, String_reverse_iterator_wchar *ret)
3361 TRACE("(%p %p)\n", this, ret);
3362 ret->ptr = basic_string_wchar_end(this);
3366 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@PAGGAAGPAGH@2@XZ */
3367 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@PEAGGAEAGPEAG_J@2@XZ */
3368 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@PBGGABGPBGH@2@XZ */
3369 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@PEBGGAEBGPEBG_J@2@XZ */
3370 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rend, 8)
3371 String_reverse_iterator_wchar* __thiscall basic_string_wchar_rend(
3372 basic_string_wchar *this, String_reverse_iterator_wchar *ret)
3374 TRACE("(%p %p)\n", this, ret);
3375 ret->ptr = basic_string_wchar_begin(this);
3379 /* ?c_str@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3380 /* ?c_str@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3381 /* ?data@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3382 /* ?data@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3383 DEFINE_THISCALL_WRAPPER(basic_string_wchar_c_str, 4)
3384 const wchar_t* __thiscall basic_string_wchar_c_str(const basic_string_wchar *this)
3386 TRACE("%p\n", this);
3387 return this->ptr ? this->ptr : basic_string_wchar__Nullstr();
3390 /* ?size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3391 /* ?size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3392 /* ?length@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3393 /* ?length@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3394 DEFINE_THISCALL_WRAPPER(basic_string_wchar_length, 4)
3395 MSVCP_size_t __thiscall basic_string_wchar_length(const basic_string_wchar *this)
3397 TRACE("%p\n", this);
3401 /* ?max_size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3402 /* ?max_size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3403 DEFINE_THISCALL_WRAPPER(basic_string_wchar_max_size, 4)
3404 MSVCP_size_t __thiscall basic_string_wchar_max_size(const basic_string_wchar *this)
3406 TRACE("%p\n", this);
3407 return MSVCP_allocator_wchar_max_size(NULL)-1;
3410 /* ?capacity@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3411 /* ?capacity@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3412 DEFINE_THISCALL_WRAPPER(basic_string_wchar_capacity, 4)
3413 MSVCP_size_t __thiscall basic_string_wchar_capacity(basic_string_wchar *this)
3415 TRACE("%p\n", this);
3419 /* ?reserve@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXI@Z */
3420 /* ?reserve@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_K@Z */
3421 DEFINE_THISCALL_WRAPPER(basic_string_wchar_reserve, 8)
3422 void __thiscall basic_string_wchar_reserve(basic_string_wchar *this, MSVCP_size_t size)
3426 TRACE("%p %ld\n", this, size);
3432 basic_string_wchar__Grow(this, size, FALSE);
3433 basic_string_wchar__Eos(this, len);
3436 /* ?empty@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE_NXZ */
3437 /* ?empty@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_NXZ */
3438 DEFINE_THISCALL_WRAPPER(basic_string_wchar_empty, 4)
3439 MSVCP_bool __thiscall basic_string_wchar_empty(basic_string_wchar *this)
3441 TRACE("%p\n", this);
3442 return this->size == 0;
3445 /* ?swap@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXAAV12@@Z */
3446 /* ?swap@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXAEAV12@@Z */
3447 DEFINE_THISCALL_WRAPPER(basic_string_wchar_swap, 8)
3448 void __thiscall basic_string_wchar_swap(basic_string_wchar *this, basic_string_wchar *str)
3450 basic_string_wchar tmp;
3451 TRACE("%p %p\n", this, str);
3458 /* ?substr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV12@II@Z */
3459 /* ?substr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV12@_K0@Z */
3460 DEFINE_THISCALL_WRAPPER(basic_string_wchar_substr, 16)
3461 basic_string_wchar* __thiscall basic_string_wchar_substr(basic_string_wchar *this,
3462 basic_string_wchar *ret, MSVCP_size_t off, MSVCP_size_t len)
3464 TRACE("%p %lu %lu\n", this, off, len);
3466 basic_string_wchar_ctor_substr_alloc(ret, this, off, len, NULL);
3470 /* ?copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPAGII@Z */
3471 /* ?copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEAG_K1@Z */
3472 DEFINE_THISCALL_WRAPPER(basic_string_wchar_copy, 16)
3473 MSVCP_size_t __thiscall basic_string_wchar_copy(const basic_string_wchar *this,
3474 wchar_t *dest, MSVCP_size_t count, MSVCP_size_t off)
3476 TRACE("%p %p %lu %lu\n", this, dest, count, off);
3478 if(off > this->size)
3480 if(count > this->size-off)
3481 count = this->size-off;
3483 char_traits_wchar__Copy_s(dest, count, this->ptr+off, count);
3487 /* ?get_allocator@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$allocator@G@2@XZ */
3488 /* ?get_allocator@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$allocator@G@2@XZ */
3489 DEFINE_THISCALL_WRAPPER(basic_string_wchar_get_allocator, 8)
3490 allocator* __thiscall basic_string_wchar_get_allocator(const basic_string_wchar *this, allocator *ret)
3492 TRACE("%p\n", this);