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, 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)) {
239 char_traits_char__Copy_s(this->ptr, this->res, ptr, len);
240 basic_string_char__Eos(this, len);
244 /* ?_Freeze@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXXZ */
245 /* ?_Freeze@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAXXZ */
246 DEFINE_THISCALL_WRAPPER(basic_string_char__Freeze, 4)
247 void __thiscall basic_string_char__Freeze(basic_string_char *this)
249 TRACE("(%p)\n", this);
250 basic_string_char__Split(this);
252 this->ptr[-1] = FROZEN;
255 /* ?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXI@Z */
256 /* ?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAX_K@Z */
257 DEFINE_THISCALL_WRAPPER(basic_string_char__Copy, 8)
258 void __thiscall basic_string_char__Copy(basic_string_char *this, MSVCP_size_t copy_len)
260 TRACE("%p %lu\n", this, copy_len);
262 if(!basic_string_char__Grow(this, copy_len, FALSE))
264 basic_string_char__Eos(this, copy_len);
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)) {
348 char_traits_char__Copy_s(this->ptr, this->res,
349 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)) {
1152 char_traits_char__Copy_s(this->ptr+this->size,
1153 this->res-this->size, append->ptr+offset, count);
1154 basic_string_char__Eos(this, this->size+count);
1160 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z */
1161 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z */
1162 DEFINE_THISCALL_WRAPPER(basic_string_char_append_cstr_len, 12)
1163 basic_string_char* __thiscall basic_string_char_append_cstr_len(
1164 basic_string_char *this, const char *append, MSVCP_size_t count)
1166 TRACE("%p %s %lu\n", this, debugstr_an(append, count), count);
1168 if(basic_string_char_inside(this, append))
1169 return basic_string_char_append_substr(this, this, append-this->ptr, count);
1171 if(basic_string_char_npos-this->size<=count || this->size+count<this->size)
1174 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1175 char_traits_char__Copy_s(this->ptr+this->size,
1176 this->res-this->size, append, count);
1177 basic_string_char__Eos(this, this->size+count);
1183 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */
1184 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KD@Z */
1185 DEFINE_THISCALL_WRAPPER(basic_string_char_append_len_ch, 12)
1186 basic_string_char* __thiscall basic_string_char_append_len_ch(
1187 basic_string_char *this, MSVCP_size_t count, char ch)
1189 TRACE("%p %lu %c\n", this, count, ch);
1191 if(basic_string_char_npos-this->size <= count)
1194 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1195 char_traits_char_assignn(this->ptr+this->size, count, ch);
1196 basic_string_char__Eos(this, this->size+count);
1202 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */
1203 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */
1204 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z */
1205 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@AEBV01@@Z */
1206 DEFINE_THISCALL_WRAPPER(basic_string_char_append, 8)
1207 basic_string_char* __thiscall basic_string_char_append(
1208 basic_string_char *this, const basic_string_char *append)
1210 return basic_string_char_append_substr(this, append,
1211 0, basic_string_char_npos);
1214 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@D@Z */
1215 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@D@Z */
1216 DEFINE_THISCALL_WRAPPER(basic_string_char_append_ch, 8)
1217 basic_string_char* __thiscall basic_string_char_append_ch(
1218 basic_string_char *this, char ch)
1220 return basic_string_char_append_len_ch(this, 1, ch);
1223 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD0@Z */
1224 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD0@Z */
1225 DEFINE_THISCALL_WRAPPER(basic_string_char_append_beg_end, 12)
1226 basic_string_char* __thiscall basic_string_char_append_beg_end(
1227 basic_string_char *this, const char *beg, const char *end)
1229 return basic_string_char_append_cstr_len(this, beg, end-beg);
1232 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z */
1233 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD@Z */
1234 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z */
1235 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@PEBD@Z */
1236 DEFINE_THISCALL_WRAPPER(basic_string_char_append_cstr, 8)
1237 basic_string_char* __thiscall basic_string_char_append_cstr(
1238 basic_string_char *this, const char *append)
1240 return basic_string_char_append_cstr_len(this, append,
1241 char_traits_char_length(append));
1243 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z */
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@AEBV10@0@Z */
1245 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z */
1246 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@0@Z */
1247 basic_string_char* __cdecl basic_string_char_concatenate(basic_string_char *ret,
1248 const basic_string_char *left, const basic_string_char *right)
1250 TRACE("%p %p\n", left, right);
1252 basic_string_char_copy_ctor(ret, left);
1253 basic_string_char_append(ret, right);
1257 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@D@Z */
1258 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@D@Z */
1259 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@D@Z */
1260 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@D@Z */
1261 basic_string_char* __cdecl basic_string_char_concatenate_bstr_ch(basic_string_char *ret,
1262 const basic_string_char *left, char right)
1264 TRACE("%p %c\n", left, right);
1266 basic_string_char_copy_ctor(ret, left);
1267 basic_string_char_append_ch(ret, right);
1271 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z */
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@AEBV10@PEBD@Z */
1273 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z */
1274 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@PEBD@Z */
1275 basic_string_char* __cdecl basic_string_char_concatenate_bstr_cstr(basic_string_char *ret,
1276 const basic_string_char *left, const char *right)
1278 TRACE("%p %s\n", left, debugstr_a(right));
1280 basic_string_char_copy_ctor(ret, left);
1281 basic_string_char_append_cstr(ret, right);
1285 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DABV10@@Z */
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@DAEBV10@@Z */
1287 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DABV10@@Z */
1288 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DAEBV10@@Z */
1289 basic_string_char* __cdecl basic_string_char_concatenate_ch_bstr(basic_string_char *ret,
1290 char left, const basic_string_char *right)
1292 TRACE("%c %p\n", left, right);
1294 basic_string_char_ctor_cstr_len_alloc(ret, &left, 1, NULL);
1295 basic_string_char_append(ret, right);
1299 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z */
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@PEBDAEBV10@@Z */
1301 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z */
1302 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBDAEBV10@@Z */
1303 basic_string_char* __cdecl basic_string_char_concatenate_cstr_bstr(basic_string_char *ret,
1304 const char *left, const basic_string_char *right)
1306 TRACE("%s %p\n", debugstr_a(left), right);
1308 basic_string_char_ctor_cstr_alloc(ret, left, NULL);
1309 basic_string_char_append(ret, right);
1313 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */
1314 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */
1315 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */
1316 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */
1317 DEFINE_THISCALL_WRAPPER(basic_string_char_operator_at, 8)
1318 char* __thiscall basic_string_char_operator_at(
1319 basic_string_char *this, MSVCP_size_t pos)
1321 TRACE("%p %lu\n", this, pos);
1323 assert(this->size >= pos);
1324 return this->ptr+pos;
1327 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */
1328 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */
1329 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */
1330 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */
1331 DEFINE_THISCALL_WRAPPER(basic_string_char_at, 8)
1332 char* __thiscall basic_string_char_at(
1333 basic_string_char *this, MSVCP_size_t pos)
1335 TRACE("%p %lu\n", this, pos);
1337 if(this->size <= pos)
1340 return this->ptr+pos;
1343 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBDI@Z */
1344 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD0@Z */
1345 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_cstr_len, 20)
1346 basic_string_char* __thiscall basic_string_char_replace_cstr_len(basic_string_char *this,
1347 MSVCP_size_t off, MSVCP_size_t len, const char *str, MSVCP_size_t str_len)
1349 MSVCP_size_t inside_pos = -1;
1350 char *ptr = this->ptr;
1352 TRACE("%p %ld %ld %p %ld\n", this, off, len, str, str_len);
1354 if(this->size < off)
1357 if(len > this->size-off)
1358 len = this->size-off;
1360 if(basic_string_char_npos-str_len <= this->size-len)
1363 if(basic_string_char_inside(this, str))
1364 inside_pos = str-ptr;
1366 if(this->size-len+str_len)
1367 basic_string_char__Grow(this, this->size-len+str_len, FALSE);
1370 if(inside_pos == -1) {
1371 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1372 memcpy(ptr+off, str, str_len*sizeof(char));
1373 } else if(len >= str_len) {
1374 memmove(ptr+off, ptr+inside_pos, str_len*sizeof(char));
1375 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1379 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1381 if(inside_pos < off+len) {
1382 size = off+len-inside_pos;
1385 memmove(ptr+off, ptr+inside_pos, size*sizeof(char));
1391 memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(char));
1395 basic_string_char__Eos(this, this->size-len+str_len);
1399 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@II@Z */
1400 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0AEBV12@00@Z */
1401 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_substr, 24)
1402 basic_string_char* __thiscall basic_string_char_replace_substr(basic_string_char *this, MSVCP_size_t off,
1403 MSVCP_size_t len, const basic_string_char *str, MSVCP_size_t str_off, MSVCP_size_t str_len)
1405 if(str->size < str_off)
1408 if(str_len > str->size-str_off)
1409 str_len = str->size-str_off;
1411 return basic_string_char_replace_cstr_len(this, off, len,
1412 str->ptr+str_off, str_len);
1415 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@@Z */
1416 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0AEBV12@@Z */
1417 DEFINE_THISCALL_WRAPPER(basic_string_char_replace, 16)
1418 basic_string_char* __thiscall basic_string_char_replace(basic_string_char *this,
1419 MSVCP_size_t off, MSVCP_size_t len, const basic_string_char *str)
1421 return basic_string_char_replace_cstr_len(this, off, len,
1422 str->ptr, str->size);
1425 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIID@Z */
1426 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K00D@Z */
1427 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_ch, 20)
1428 basic_string_char* __thiscall basic_string_char_replace_ch(basic_string_char *this,
1429 MSVCP_size_t off, MSVCP_size_t len, MSVCP_size_t count, char ch)
1433 TRACE("%p %ld %ld %ld %c\n", this, off, len, count, ch);
1435 if(this->size < off)
1438 if(len > this->size-off)
1439 len = this->size-off;
1441 if(basic_string_char_npos-count <= this->size-len)
1444 if(this->size-len+count)
1445 basic_string_char__Grow(this, this->size-len+count, FALSE);
1448 memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(char));
1449 char_traits_char_assignn(ptr+off, count, ch);
1450 basic_string_char__Eos(this, this->size-len+count);
1455 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBD@Z */
1456 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD@Z */
1457 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_cstr, 16)
1458 basic_string_char* __thiscall basic_string_char_replace_cstr(basic_string_char *this,
1459 MSVCP_size_t off, MSVCP_size_t len, const char *str)
1461 return basic_string_char_replace_cstr_len(this, off, len, str,
1462 char_traits_char_length(str));
1465 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0ABV12@@Z */
1466 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0AEBV12@@Z */
1467 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_bstr, 16)
1468 basic_string_char* __thiscall basic_string_char_replace_iter_bstr(basic_string_char *this,
1469 char *beg, char *end, const basic_string_char *str)
1471 return basic_string_char_replace(this, basic_string_char__Pdif(beg, this->ptr),
1472 basic_string_char__Pdif(end, beg), str);
1475 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0ID@Z */
1476 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0_KD@Z */
1477 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_chn, 20)
1478 basic_string_char* __thiscall basic_string_char_replace_iter_chn(basic_string_char *this,
1479 char *beg, char *end, MSVCP_size_t count, char ch)
1481 return basic_string_char_replace_ch(this, basic_string_char__Pdif(beg, this->ptr),
1482 basic_string_char__Pdif(end, beg), count, ch);
1485 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBD1@Z */
1486 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD1@Z */
1487 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_iter, 20)
1488 basic_string_char* __thiscall basic_string_char_replace_iter_iter(basic_string_char *this,
1489 char *beg1, char *end1, const char *beg2, const char *end2)
1491 return basic_string_char_replace_cstr_len(this, basic_string_char__Pdif(beg1, this->ptr),
1492 basic_string_char__Pdif(end1, beg1), beg2, basic_string_char__Pdif(end2, beg2));
1495 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBD@Z */
1496 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD@Z */
1497 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr, 16)
1498 basic_string_char* __thiscall basic_string_char_replace_iter_cstr(basic_string_char *this,
1499 char *beg, char *end, const char *str)
1501 return basic_string_char_replace_cstr(this, basic_string_char__Pdif(beg, this->ptr),
1502 basic_string_char__Pdif(end, beg), str);
1505 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBDI@Z */
1506 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD_K@Z */
1507 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr_len, 20)
1508 basic_string_char* __thiscall basic_string_char_replace_iter_cstr_len(basic_string_char *this,
1509 char *beg, char *end, const char *str, MSVCP_size_t len)
1511 return basic_string_char_replace_cstr_len(this, basic_string_char__Pdif(beg, this->ptr),
1512 basic_string_char__Pdif(end, beg), str, len);
1515 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IABV12@@Z */
1516 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KAEBV12@@Z */
1517 DEFINE_THISCALL_WRAPPER(basic_string_char_insert, 12)
1518 basic_string_char* __thiscall basic_string_char_insert(basic_string_char *this,
1519 MSVCP_size_t off, const basic_string_char *str)
1521 return basic_string_char_replace(this, off, 0, str);
1524 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IABV12@II@Z */
1525 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KAEBV12@00@Z */
1526 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_substr, 20)
1527 basic_string_char* __thiscall basic_string_char_insert_substr(
1528 basic_string_char *this, MSVCP_size_t off, const basic_string_char *str,
1529 MSVCP_size_t str_off, MSVCP_size_t str_count)
1531 return basic_string_char_replace_substr(this, off, 0, str, str_off, str_count);
1534 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IPBD@Z */
1535 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KPEBD@Z */
1536 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_cstr, 12)
1537 basic_string_char* __thiscall basic_string_char_insert_cstr(
1538 basic_string_char *this, MSVCP_size_t off, const char *str)
1540 return basic_string_char_replace_cstr(this, off, 0, str);
1543 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IPBDI@Z */
1544 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KPEBD0@Z */
1545 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_cstr_len, 16)
1546 basic_string_char* __thiscall basic_string_char_insert_cstr_len(basic_string_char *this,
1547 MSVCP_size_t off, const char *str, MSVCP_size_t str_len)
1549 return basic_string_char_replace_cstr_len(this, off, 0, str, str_len);
1552 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IID@Z */
1553 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0D@Z */
1554 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_chn, 16)
1555 basic_string_char* __thiscall basic_string_char_insert_chn(basic_string_char *this,
1556 MSVCP_size_t off, MSVCP_size_t count, char ch)
1558 return basic_string_char_replace_ch(this, off, 0, count, ch);
1561 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPADD@Z */
1562 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEADD@Z */
1563 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter_ch, 12)
1564 char* __thiscall basic_string_char_insert_iter_ch(basic_string_char *this, char *pos, char ch)
1566 MSVCP_size_t off = basic_string_char__Pdif(pos, this->ptr);
1567 basic_string_char_insert_chn(this, off, 1, ch);
1568 return basic_string_char__Psum(this->ptr, off);
1571 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXPADID@Z */
1572 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXPEAD_KD@Z */
1573 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter_chn, 16)
1574 void __thiscall basic_string_char_insert_iter_chn(basic_string_char *this,
1575 char *pos, MSVCP_size_t n, char ch)
1577 basic_string_char_insert_chn(this, basic_string_char__Pdif(pos, this->ptr), n, ch);
1580 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXPADPBD1@Z */
1581 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXPEADPEBD1@Z */
1582 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter, 16)
1583 void __thiscall basic_string_char_insert_iter(basic_string_char *this,
1584 char *pos, const char *beg, const char *end)
1586 basic_string_char_insert_cstr_len(this, basic_string_char__Pdif(pos, this->ptr),
1587 beg, basic_string_char__Pdif(end, beg));
1590 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXID@Z */
1591 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_KD@Z */
1592 DEFINE_THISCALL_WRAPPER(basic_string_char_resize_ch, 12)
1593 void __thiscall basic_string_char_resize_ch(
1594 basic_string_char *this, MSVCP_size_t size, char ch)
1596 TRACE("%p %lu %c\n", this, size, ch);
1598 if(size <= this->size)
1599 basic_string_char_erase(this, size, this->size);
1601 basic_string_char_append_len_ch(this, size-this->size, ch);
1604 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z */
1605 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z */
1606 DEFINE_THISCALL_WRAPPER(basic_string_char_resize, 8)
1607 void __thiscall basic_string_char_resize(
1608 basic_string_char *this, MSVCP_size_t size)
1610 basic_string_char_resize_ch(this, size, '\0');
1613 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADXZ */
1614 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADXZ */
1615 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1616 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1617 DEFINE_THISCALL_WRAPPER(basic_string_char_begin, 4)
1618 char* __thiscall basic_string_char_begin(basic_string_char *this)
1620 TRACE("(%p)\n", this);
1621 basic_string_char__Freeze(this);
1625 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADXZ */
1626 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADXZ */
1627 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1628 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1629 DEFINE_THISCALL_WRAPPER(basic_string_char_end, 4)
1630 char* __thiscall basic_string_char_end(basic_string_char *this)
1632 TRACE("(%p)\n", this);
1633 basic_string_char__Freeze(this);
1634 return this->ptr+this->size;
1637 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@PADDAADPADH@2@XZ */
1638 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@PEADDAEADPEAD_J@2@XZ */
1639 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@PBDDABDPBDH@2@XZ */
1640 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@PEBDDAEBDPEBD_J@2@XZ */
1641 DEFINE_THISCALL_WRAPPER(basic_string_char_rbegin, 8)
1642 String_reverse_iterator_char* __thiscall basic_string_char_rbegin(
1643 basic_string_char *this, String_reverse_iterator_char *ret)
1645 TRACE("(%p %p)\n", this, ret);
1646 ret->ptr = basic_string_char_end(this);
1650 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@PADDAADPADH@2@XZ */
1651 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@PEADDAEADPEAD_J@2@XZ */
1652 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@PBDDABDPBDH@2@XZ */
1653 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@PEBDDAEBDPEBD_J@2@XZ */
1654 DEFINE_THISCALL_WRAPPER(basic_string_char_rend, 8)
1655 String_reverse_iterator_char* __thiscall basic_string_char_rend(
1656 basic_string_char *this, String_reverse_iterator_char *ret)
1658 TRACE("(%p %p)\n", this, ret);
1659 ret->ptr = basic_string_char_begin(this);
1663 /* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1664 /* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1665 /* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1666 /* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1667 DEFINE_THISCALL_WRAPPER(basic_string_char_c_str, 4)
1668 const char* __thiscall basic_string_char_c_str(const basic_string_char *this)
1670 TRACE("%p\n", this);
1671 return this->ptr ? this->ptr : basic_string_char__Nullstr();
1674 /* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1675 /* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1676 /* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1677 /* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1678 DEFINE_THISCALL_WRAPPER(basic_string_char_length, 4)
1679 MSVCP_size_t __thiscall basic_string_char_length(const basic_string_char *this)
1681 TRACE("%p\n", this);
1685 /* ?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1686 /* ?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1687 DEFINE_THISCALL_WRAPPER(basic_string_char_max_size, 4)
1688 MSVCP_size_t __thiscall basic_string_char_max_size(const basic_string_char *this)
1690 TRACE("%p\n", this);
1691 return MSVCP_allocator_char_max_size(NULL)-1;
1694 /* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1695 /* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1696 DEFINE_THISCALL_WRAPPER(basic_string_char_capacity, 4)
1697 MSVCP_size_t __thiscall basic_string_char_capacity(basic_string_char *this)
1699 TRACE("%p\n", this);
1703 /* ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z */
1704 /* ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z */
1705 DEFINE_THISCALL_WRAPPER(basic_string_char_reserve, 8)
1706 void __thiscall basic_string_char_reserve(basic_string_char *this, MSVCP_size_t size)
1710 TRACE("%p %ld\n", this, size);
1716 basic_string_char__Grow(this, size, FALSE);
1717 basic_string_char__Eos(this, len);
1720 /* ?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE_NXZ */
1721 /* ?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_NXZ */
1722 DEFINE_THISCALL_WRAPPER(basic_string_char_empty, 4)
1723 MSVCP_bool __thiscall basic_string_char_empty(basic_string_char *this)
1725 TRACE("%p\n", this);
1726 return this->size == 0;
1729 /* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXAAV12@@Z */
1730 /* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEAV12@@Z */
1731 DEFINE_THISCALL_WRAPPER(basic_string_char_swap, 8)
1732 void __thiscall basic_string_char_swap(basic_string_char *this, basic_string_char *str)
1734 basic_string_char tmp;
1735 TRACE("%p %p\n", this, str);
1742 /* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV12@II@Z */
1743 /* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV12@_K0@Z */
1744 DEFINE_THISCALL_WRAPPER(basic_string_char_substr, 16)
1745 basic_string_char* __thiscall basic_string_char_substr(basic_string_char *this,
1746 basic_string_char *ret, MSVCP_size_t off, MSVCP_size_t len)
1748 TRACE("%p %lu %lu\n", this, off, len);
1750 basic_string_char_ctor_substr_alloc(ret, this, off, len, NULL);
1754 /* ?copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPADII@Z */
1755 /* ?copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEAD_K1@Z */
1756 DEFINE_THISCALL_WRAPPER(basic_string_char_copy, 16)
1757 MSVCP_size_t __thiscall basic_string_char_copy(const basic_string_char *this,
1758 char *dest, MSVCP_size_t count, MSVCP_size_t off)
1760 TRACE("%p %p %lu %lu\n", this, dest, count, off);
1762 if(off > this->size)
1764 if(count > this->size-off)
1765 count = this->size-off;
1766 char_traits_char__Copy_s(dest, count, this->ptr+off, count);
1770 /* ?get_allocator@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$allocator@D@2@XZ */
1771 /* ?get_allocator@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$allocator@D@2@XZ */
1772 DEFINE_THISCALL_WRAPPER(basic_string_char_get_allocator, 8)
1773 allocator* __thiscall basic_string_char_get_allocator(const basic_string_char *this, allocator *ret)
1775 TRACE("%p\n", this);
1779 static wchar_t* char_traits_wchar__Move_s(wchar_t *dest,
1780 MSVCP_size_t size, const wchar_t *src, MSVCP_size_t count)
1782 if(!dest || !src || size<count) {
1785 _invalid_parameter(NULL, NULL, NULL, 0, 0);
1789 return memmove(dest, src, count * sizeof(WCHAR));
1792 static wchar_t* char_traits_wchar__Copy_s(wchar_t *dest,
1793 MSVCP_size_t size, const wchar_t *src, MSVCP_size_t count)
1795 if(!dest || !src || size<count) {
1798 _invalid_parameter(NULL, NULL, NULL, 0, 0);
1802 return memcpy(dest, src, count * sizeof(wchar_t));
1805 static MSVCP_size_t char_traits_wchar_length(const wchar_t *str)
1807 return wcslen((WCHAR*)str);
1810 static wchar_t* char_traits_wchar_assignn(wchar_t *str, MSVCP_size_t num, wchar_t c)
1812 return memset(str, c, num);
1815 static int char_traits_wchar_compare(const wchar_t *s1,
1816 const wchar_t *s2, MSVCP_size_t count)
1818 int ret = memcmp(s1, s2, count);
1819 return (ret>0 ? 1 : (ret<0 ? -1 : 0));
1822 static const wchar_t* char_traits_wchar_find(const wchar_t *str,
1823 MSVCP_size_t range, const wchar_t *c)
1825 return memchr(str, *c, range);
1828 static MSVCP_bool basic_string_wchar_inside(
1829 basic_string_wchar *this, const wchar_t *ptr)
1831 return ptr>=this->ptr && ptr<this->ptr+this->size;
1834 /* ?npos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@2IB */
1835 /* ?npos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@2_KB */
1836 const MSVCP_size_t basic_string_wchar_npos = -1;
1838 /* ?_C@?1??_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGXZ@4GB */
1839 /* ?_C@?1??_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGXZ@4GB */
1840 const wchar_t basic_string_wchar_nullbyte = '\0';
1842 /* ?_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGXZ */
1843 /* ?_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGXZ */
1844 const wchar_t* __cdecl basic_string_wchar__Nullstr(void)
1846 return &basic_string_wchar_nullbyte;
1849 /* ?_Refcnt@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEAAEPBG@Z */
1850 /* ?_Refcnt@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAAEAEPEBG@Z */
1851 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Refcnt, 8)
1852 unsigned short* __thiscall basic_string_wchar__Refcnt(basic_string_wchar *this, const wchar_t *ptr)
1854 TRACE("(%p %p)\n", this, ptr);
1855 return (unsigned short*)ptr-1;
1858 /* ?_Eos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXI@Z */
1859 /* ?_Eos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_K@Z */
1860 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Eos, 8)
1861 void __thiscall basic_string_wchar__Eos(basic_string_wchar *this, MSVCP_size_t len)
1867 void basic_string_wchar_clear(basic_string_wchar *this)
1870 basic_string_wchar__Eos(this, 0);
1873 /* ?_Tidy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEX_N@Z */
1874 /* ?_Tidy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_N@Z */
1875 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Tidy, 8)
1876 void __thiscall basic_string_wchar__Tidy(basic_string_wchar *this, MSVCP_bool built)
1878 TRACE("(%p %d)\n", this, built);
1880 if(!this->ptr || !built);
1881 else if(!this->ptr[-1] || (unsigned short)this->ptr[-1]==FROZEN)
1882 MSVCP_allocator_wchar_deallocate(NULL, this->ptr, this->res+2);
1886 memset(this, 0, sizeof(*this));
1889 /* ?_Grow@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAE_NI_N@Z */
1890 /* ?_Grow@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAA_N_K_N@Z */
1891 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Grow, 12)
1892 MSVCP_bool __thiscall basic_string_wchar__Grow(basic_string_wchar *this, MSVCP_size_t new_size, MSVCP_bool trim)
1896 basic_string_wchar__Tidy(this, TRUE);
1898 basic_string_wchar__Eos(this, 0);
1899 } else if(this->res<new_size || trim ||
1900 (this->ptr && this->ptr[-1] && (unsigned short)this->ptr[-1]!=FROZEN)) {
1901 MSVCP_size_t new_res = new_size, len = this->size;
1904 if(!trim && this->ptr && !this->ptr[-1]) {
1906 if(new_res/3 < this->res/2)
1907 new_res = this->res + this->res/2;
1910 ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_res+2);
1913 ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_size+2);
1916 ERR("Out of memory\n");
1925 char_traits_wchar__Copy_s(ptr+1, new_size, this->ptr, len);
1926 basic_string_wchar__Tidy(this, TRUE);
1928 this->res = new_res;
1929 basic_string_wchar__Eos(this, len);
1935 /* ?_Split@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXXZ */
1936 /* ?_Split@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAXXZ */
1937 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Split, 4)
1938 void __thiscall basic_string_wchar__Split(basic_string_wchar *this)
1943 TRACE("(%p)\n", this);
1945 if(!this->ptr || !this->ptr[-1] || (unsigned short)this->ptr[-1]==FROZEN)
1950 basic_string_wchar__Tidy(this, TRUE);
1951 if(basic_string_wchar__Grow(this, len, FALSE)) {
1952 char_traits_wchar__Copy_s(this->ptr, this->res, ptr, len);
1953 basic_string_wchar__Eos(this, len);
1957 /* ?_Freeze@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXXZ */
1958 /* ?_Freeze@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAXXZ */
1959 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Freeze, 4)
1960 void __thiscall basic_string_wchar__Freeze(basic_string_wchar *this)
1962 TRACE("(%p)\n", this);
1963 basic_string_wchar__Split(this);
1965 this->ptr[-1] = FROZEN;
1968 /* ?_Copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXI@Z */
1969 /* ?_Copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_K@Z */
1970 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Copy, 8)
1971 void __thiscall basic_string_wchar__Copy(basic_string_wchar *this, MSVCP_size_t copy_len)
1973 TRACE("%p %lu\n", this, copy_len);
1975 if(!basic_string_wchar__Grow(this, copy_len, FALSE))
1977 basic_string_wchar__Eos(this, copy_len);
1980 /* ?_Pdif@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAIPBG0@Z */
1981 /* ?_Pdif@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CA_KPEBG0@Z */
1982 MSVCP_size_t __cdecl basic_string_wchar__Pdif(const wchar_t *i1, const wchar_t *i2)
1984 TRACE("(%p %p)\n", i1, i2);
1985 return !i1 ? 0 : i1-i2;
1988 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPAGPAGI@Z */
1989 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEAGPEAG_K@Z */
1990 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGPBGI@Z */
1991 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGPEBG_K@Z */
1992 wchar_t* __cdecl basic_string_wchar__Psum(wchar_t *iter, MSVCP_size_t add)
1994 TRACE("(%p %lu)\n", iter, add);
1995 return iter ? iter+add : iter;
1998 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@II@Z */
1999 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0@Z */
2000 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase, 12)
2001 basic_string_wchar* __thiscall basic_string_wchar_erase(
2002 basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t len)
2004 TRACE("%p %lu %lu\n", this, pos, len);
2006 if(pos > this->size)
2009 if(len > this->size-pos)
2010 len = this->size-pos;
2013 basic_string_wchar__Split(this);
2014 char_traits_wchar__Move_s(this->ptr+pos, this->res-pos,
2015 this->ptr+pos+len, this->size-pos-len);
2016 basic_string_wchar__Eos(this, this->size-len);
2022 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAG0@Z */
2023 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAG0@Z */
2024 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase_iter, 12)
2025 wchar_t* __thiscall basic_string_wchar_erase_iter(basic_string_wchar *this, wchar_t *beg, wchar_t *end)
2027 MSVCP_size_t pos = basic_string_wchar__Pdif(beg, this->ptr);
2028 basic_string_wchar_erase(this, pos, basic_string_wchar__Pdif(end, beg));
2029 return basic_string_wchar__Psum(this->ptr, pos);
2032 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAG@Z */
2033 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAG@Z */
2034 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase_beg, 8)
2035 wchar_t* __thiscall basic_string_wchar_erase_beg(basic_string_wchar *this, wchar_t *beg)
2037 MSVCP_size_t pos = beg-this->ptr;
2038 basic_string_wchar_erase(this, pos, 1);
2039 return this->ptr+pos;
2042 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@II@Z */
2043 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
2044 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_substr, 16)
2045 basic_string_wchar* __thiscall basic_string_wchar_assign_substr(
2046 basic_string_wchar *this, const basic_string_wchar *assign,
2047 MSVCP_size_t pos, MSVCP_size_t len)
2049 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
2051 if(assign->size < pos)
2054 if(len > assign->size-pos)
2055 len = assign->size-pos;
2057 if(this == assign) {
2058 basic_string_wchar_erase(this, pos+len, basic_string_wchar_npos);
2059 basic_string_wchar_erase(this, 0, pos);
2060 } else if(basic_string_wchar__Grow(this, len, FALSE)) {
2061 char_traits_wchar__Copy_s(this->ptr, this->res,
2062 assign->ptr+pos, len);
2063 basic_string_wchar__Eos(this, len);
2069 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBGI@Z */
2070 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG_K@Z */
2071 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_cstr_len, 12)
2072 basic_string_wchar* __thiscall basic_string_wchar_assign_cstr_len(
2073 basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
2075 TRACE("%p %s %lu\n", this, debugstr_wn(str, len), len);
2077 if(basic_string_wchar_inside(this, str))
2078 return basic_string_wchar_assign_substr(this, this, str-this->ptr, len);
2079 else if(basic_string_wchar__Grow(this, len, FALSE)) {
2080 char_traits_wchar__Copy_s(this->ptr, this->res, str, len);
2081 basic_string_wchar__Eos(this, len);
2087 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@@Z */
2088 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@@Z */
2089 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@ABV01@@Z */
2090 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@AEBV01@@Z */
2091 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign, 8)
2092 basic_string_wchar* __thiscall basic_string_wchar_assign(
2093 basic_string_wchar *this, const basic_string_wchar *assign)
2095 return basic_string_wchar_assign_substr(this, assign,
2096 0, basic_string_wchar_npos);
2099 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG@Z */
2100 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG@Z */
2101 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@PBG@Z */
2102 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@PEBG@Z */
2103 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_cstr, 8)
2104 basic_string_wchar* __thiscall basic_string_wchar_assign_cstr(
2105 basic_string_wchar *this, const wchar_t *str)
2107 return basic_string_wchar_assign_cstr_len(this, str,
2108 char_traits_wchar_length(str));
2111 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@G@Z */
2112 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@G@Z */
2113 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_ch, 8)
2114 basic_string_wchar* __thiscall basic_string_wchar_assign_ch(
2115 basic_string_wchar *this, wchar_t ch)
2117 return basic_string_wchar_assign_cstr_len(this, &ch, 1);
2120 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IG@Z */
2121 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KG@Z */
2122 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assignn, 12)
2123 basic_string_wchar* __thiscall basic_string_wchar_assignn(
2124 basic_string_wchar *this, MSVCP_size_t count, wchar_t ch)
2126 TRACE("%p %ld %c\n", this, count, ch);
2128 basic_string_wchar__Grow(this, count, FALSE);
2129 char_traits_wchar_assignn(this->ptr, count, ch);
2130 basic_string_wchar__Eos(this, count);
2134 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG0@Z */
2135 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG0@Z */
2136 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_ptr_ptr, 12)
2137 basic_string_wchar* __thiscall basic_string_wchar_assign_ptr_ptr(
2138 basic_string_wchar *this, const wchar_t *first, const wchar_t *last)
2140 return basic_string_wchar_assign_cstr_len(this, first, last-first);
2143 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBGIABV?$allocator@G@1@@Z */
2144 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG_KAEBV?$allocator@G@1@@Z */
2145 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_cstr_len_alloc, 16)
2146 basic_string_wchar* __thiscall basic_string_wchar_ctor_cstr_len_alloc(
2147 basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len, const void *alloc)
2149 TRACE("%p %s %ld\n", this, debugstr_wn(str, len), len);
2151 basic_string_wchar__Tidy(this, FALSE);
2152 basic_string_wchar_assign_cstr_len(this, str, len);
2156 basic_string_wchar* basic_string_wchar_ctor_cstr_len(basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
2158 return basic_string_wchar_ctor_cstr_len_alloc(this, str, len, NULL);
2161 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV01@IIABV?$allocator@G@1@@Z */
2162 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV01@_K1AEBV?$allocator@G@1@@Z */
2163 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_substr_alloc, 20)
2164 basic_string_wchar* __thiscall basic_string_wchar_ctor_substr_alloc(
2165 basic_string_wchar *this, const basic_string_wchar *assign,
2166 MSVCP_size_t pos, MSVCP_size_t len, const void *alloc)
2168 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
2170 basic_string_wchar__Tidy(this, FALSE);
2171 basic_string_wchar_assign_substr(this, assign, pos, len);
2175 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBGABV?$allocator@G@1@@Z */
2176 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBGAEBV?$allocator@G@1@@Z */
2177 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_cstr_alloc, 12)
2178 basic_string_wchar* __thiscall basic_string_wchar_ctor_cstr_alloc(
2179 basic_string_wchar *this, const wchar_t *str, const void *alloc)
2181 TRACE("%p %s\n", this, debugstr_w(str));
2183 basic_string_wchar__Tidy(this, FALSE);
2184 basic_string_wchar_assign_cstr(this, str);
2188 basic_string_wchar* basic_string_wchar_ctor_cstr(basic_string_wchar *this, const wchar_t *str)
2190 return basic_string_wchar_ctor_cstr_alloc(this, str, NULL);
2193 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@IGABV?$allocator@G@1@@Z */
2194 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@_KGAEBV?$allocator@G@1@@Z */
2195 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_ch_alloc, 16)
2196 basic_string_wchar* __thiscall basic_string_wchar_ctor_ch_alloc(basic_string_wchar *this,
2197 MSVCP_size_t count, wchar_t ch, const void *alloc)
2199 TRACE("%p %ld %c\n", this, count, ch);
2201 basic_string_wchar__Tidy(this, FALSE);
2202 basic_string_wchar_assignn(this, count, ch);
2206 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBG0ABV?$allocator@G@1@@Z */
2207 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG0AEBV?$allocator@G@1@@Z */
2208 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_iter, 16)
2209 basic_string_wchar* __thiscall basic_string_wchar_ctor_iter(basic_string_wchar *this,
2210 const wchar_t *first, const wchar_t *last, allocator *alloc)
2212 TRACE("(%p %p %p %p)\n", this, first, last, alloc);
2214 basic_string_wchar__Tidy(this, FALSE);
2215 basic_string_wchar_assign_cstr_len(this, first, basic_string_wchar__Pdif(last, first));
2219 /* ??_F?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
2220 /* ??_F?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
2221 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor, 4)
2222 basic_string_wchar* __thiscall basic_string_wchar_ctor(basic_string_wchar *this)
2224 TRACE("%p\n", this);
2226 basic_string_wchar__Tidy(this, FALSE);
2230 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$allocator@G@1@@Z */
2231 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV?$allocator@G@1@@Z */
2232 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_alloc, 8)
2233 basic_string_wchar* __thiscall basic_string_wchar_ctor_alloc(
2234 basic_string_wchar *this, const void *alloc)
2236 TRACE("%p %p\n", this, alloc);
2238 basic_string_wchar__Tidy(this, FALSE);
2242 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV01@@Z */
2243 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV01@@Z */
2244 DEFINE_THISCALL_WRAPPER(basic_string_wchar_copy_ctor, 8)
2245 basic_string_wchar* __thiscall basic_string_wchar_copy_ctor(
2246 basic_string_wchar *this, const basic_string_wchar *copy)
2248 TRACE("%p %p\n", this, copy);
2250 basic_string_wchar__Tidy(this, FALSE);
2251 basic_string_wchar_assign(this, copy);
2255 /* ??1?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@XZ */
2256 /* ??1?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@XZ */
2257 DEFINE_THISCALL_WRAPPER(basic_string_wchar_dtor, 4)
2258 void __thiscall basic_string_wchar_dtor(basic_string_wchar *this)
2260 TRACE("%p\n", this);
2261 basic_string_wchar__Tidy(this, TRUE);
2264 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIPBGI@Z */
2265 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0PEBG0@Z */
2266 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr_cstr_len, 20)
2267 int __thiscall basic_string_wchar_compare_substr_cstr_len(
2268 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2269 const wchar_t *str, MSVCP_size_t count)
2273 TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_wn(str, count), count);
2275 if(this->size < pos)
2278 if(num > this->size-pos)
2279 num = this->size-pos;
2281 ans = char_traits_wchar_compare(this->ptr+pos,
2282 str, num>count ? count : num);
2288 else if(num < count)
2293 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHPBG@Z */
2294 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAHPEBG@Z */
2295 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_cstr, 8)
2296 int __thiscall basic_string_wchar_compare_cstr(
2297 const basic_string_wchar *this, const wchar_t *str)
2299 return basic_string_wchar_compare_substr_cstr_len(this, 0, this->size,
2300 str, char_traits_wchar_length(str));
2303 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIABV12@II@Z */
2304 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0AEBV12@00@Z */
2305 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr_substr, 24)
2306 int __thiscall basic_string_wchar_compare_substr_substr(
2307 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2308 const basic_string_wchar *compare, MSVCP_size_t off, MSVCP_size_t count)
2310 TRACE("%p %lu %lu %p %lu %lu\n", this, pos, num, compare, off, count);
2312 if(compare->size < off)
2315 if(count > compare->size-off)
2316 count = compare->size-off;
2318 return basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2319 compare->ptr+off, count);
2322 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIABV12@@Z */
2323 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0AEBV12@@Z */
2324 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr, 16)
2325 int __thiscall basic_string_wchar_compare_substr(
2326 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2327 const basic_string_wchar *compare)
2329 return basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2330 compare->ptr, compare->size);
2333 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHABV12@@Z */
2334 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAHAEBV12@@Z */
2335 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare, 8)
2336 int __thiscall basic_string_wchar_compare(
2337 const basic_string_wchar *this, const basic_string_wchar *compare)
2339 return basic_string_wchar_compare_substr_cstr_len(this, 0, this->size,
2340 compare->ptr, compare->size);
2343 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIPBG@Z */
2344 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0PEBG@Z */
2345 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr_cstr, 16)
2346 int __thiscall basic_string_wchar_compare_substr_cstr(const basic_string_wchar *this,
2347 MSVCP_size_t pos, MSVCP_size_t num, const wchar_t *str)
2349 return basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2350 str, char_traits_wchar_length(str));
2353 /* ??$?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 */
2354 /* ??$?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 */
2355 /* ??8std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2356 /* ??8std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2357 MSVCP_bool __cdecl basic_string_wchar_equal(
2358 const basic_string_wchar *left, const basic_string_wchar *right)
2360 return basic_string_wchar_compare(left, right) == 0;
2363 /* ??$?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 */
2364 /* ??$?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 */
2365 /* ??8std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2366 /* ??8std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2367 MSVCP_bool __cdecl basic_string_wchar_equal_str_cstr(
2368 const basic_string_wchar *left, const wchar_t *right)
2370 return basic_string_wchar_compare_cstr(left, right) == 0;
2373 /* ??$?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 */
2374 /* ??$?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 */
2375 /* ??8std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2376 /* ??8std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2377 MSVCP_bool __cdecl basic_string_wchar_equal_cstr_str(
2378 const wchar_t *left, const basic_string_wchar *right)
2380 return basic_string_wchar_compare_cstr(right, left) == 0;
2383 /* ??$?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 */
2384 /* ??$?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 */
2385 /* ??9std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2386 /* ??9std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2387 MSVCP_bool __cdecl basic_string_wchar_not_equal(
2388 const basic_string_wchar *left, const basic_string_wchar *right)
2390 return basic_string_wchar_compare(left, right) != 0;
2393 /* ??$?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 */
2394 /* ??$?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 */
2395 /* ??9std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2396 /* ??9std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2397 MSVCP_bool __cdecl basic_string_wchar_not_equal_str_cstr(
2398 const basic_string_wchar *left, const wchar_t *right)
2400 return basic_string_wchar_compare_cstr(left, right) != 0;
2403 /* ??$?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 */
2404 /* ??$?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 */
2405 /* ??9std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2406 /* ??9std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2407 MSVCP_bool __cdecl basic_string_wchar_not_equal_cstr_str(
2408 const wchar_t *left, const basic_string_wchar *right)
2410 return basic_string_wchar_compare_cstr(right, left) != 0;
2413 /* ??$?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 */
2414 /* ??$?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 */
2415 /* ??Mstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2416 /* ??Mstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2417 MSVCP_bool __cdecl basic_string_wchar_lower(
2418 const basic_string_wchar *left, const basic_string_wchar *right)
2420 return basic_string_wchar_compare(left, right) < 0;
2423 /* ??$?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 */
2424 /* ??$?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 */
2425 /* ??Mstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2426 /* ??Mstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2427 MSVCP_bool __cdecl basic_string_wchar_lower_bstr_cstr(
2428 const basic_string_wchar *left, const wchar_t *right)
2430 return basic_string_wchar_compare_cstr(left, right) < 0;
2433 /* ??$?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 */
2434 /* ??$?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 */
2435 /* ??Mstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2436 /* ??Mstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2437 MSVCP_bool __cdecl basic_string_wchar_lower_cstr_bstr(
2438 const wchar_t *left, const basic_string_wchar *right)
2440 return basic_string_wchar_compare_cstr(right, left) > 0;
2443 /* ??$?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 */
2444 /* ??$?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 */
2445 /* ??Nstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2446 /* ??Nstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2447 MSVCP_bool __cdecl basic_string_wchar_leq(
2448 const basic_string_wchar *left, const basic_string_wchar *right)
2450 return basic_string_wchar_compare(left, right) <= 0;
2453 /* ??$?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 */
2454 /* ??$?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 */
2455 /* ??Nstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2456 /* ??Nstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2457 MSVCP_bool __cdecl basic_string_wchar_leq_bstr_cstr(
2458 const basic_string_wchar *left, const wchar_t *right)
2460 return basic_string_wchar_compare_cstr(left, right) <= 0;
2463 /* ??$?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 */
2464 /* ??$?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 */
2465 /* ??Nstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2466 /* ??Nstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2467 MSVCP_bool __cdecl basic_string_wchar_leq_cstr_bstr(
2468 const wchar_t *left, const basic_string_wchar *right)
2470 return basic_string_wchar_compare_cstr(right, left) >= 0;
2473 /* ??$?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 */
2474 /* ??$?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 */
2475 /* ??Ostd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2476 /* ??Ostd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2477 MSVCP_bool __cdecl basic_string_wchar_greater(
2478 const basic_string_wchar *left, const basic_string_wchar *right)
2480 return basic_string_wchar_compare(left, right) > 0;
2483 /* ??$?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 */
2484 /* ??$?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 */
2485 /* ??Ostd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2486 /* ??Ostd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2487 MSVCP_bool __cdecl basic_string_wchar_greater_bstr_cstr(
2488 const basic_string_wchar *left, const wchar_t *right)
2490 return basic_string_wchar_compare_cstr(left, right) > 0;
2493 /* ??$?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 */
2494 /* ??$?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 */
2495 /* ??Ostd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2496 /* ??Ostd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2497 MSVCP_bool __cdecl basic_string_wchar_greater_cstr_bstr(
2498 const wchar_t *left, const basic_string_wchar *right)
2500 return basic_string_wchar_compare_cstr(right, left) < 0;
2503 /* ??$?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 */
2504 /* ??$?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 */
2505 /* ??Pstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2506 /* ??Pstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2507 MSVCP_bool __cdecl basic_string_wchar_geq(
2508 const basic_string_wchar *left, const basic_string_wchar *right)
2510 return basic_string_wchar_compare(left, right) >= 0;
2513 /* ??$?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 */
2514 /* ??$?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 */
2515 /* ??Pstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2516 /* ??Pstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2517 MSVCP_bool __cdecl basic_string_wchar_geq_bstr_cstr(
2518 const basic_string_wchar *left, const wchar_t *right)
2520 return basic_string_wchar_compare_cstr(left, right) >= 0;
2523 /* ??$?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 */
2524 /* ??$?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 */
2525 /* ??Pstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2526 /* ??Pstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2527 MSVCP_bool __cdecl basic_string_wchar_geq_cstr_bstr(
2528 const wchar_t *left, const basic_string_wchar *right)
2530 return basic_string_wchar_compare_cstr(right, left) <= 0;
2533 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2534 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2535 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_cstr_substr, 16)
2536 MSVCP_size_t __thiscall basic_string_wchar_find_cstr_substr(
2537 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos, MSVCP_size_t len)
2539 const wchar_t *p, *end;
2541 TRACE("%p %s %lu %lu\n", this, debugstr_wn(find, len), pos, len);
2543 if(len==0 && pos<=this->size)
2545 if(pos>=this->size || len>this->size)
2546 return basic_string_wchar_npos;
2548 end = this->ptr+this->size-len+1;
2549 for(p=this->ptr+pos; p<end; p++) {
2550 p = char_traits_wchar_find(p, end-p, find);
2554 if(!char_traits_wchar_compare(p, find, len))
2558 return basic_string_wchar_npos;
2561 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2562 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2563 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_off, 12)
2564 MSVCP_size_t __thiscall basic_string_wchar_find_off(
2565 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2567 return basic_string_wchar_find_cstr_substr(this, find->ptr, off, find->size);
2570 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2571 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2572 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_ch, 12)
2573 MSVCP_size_t __thiscall basic_string_wchar_find_ch(
2574 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t pos)
2576 return basic_string_wchar_find_cstr_substr(this, &ch, pos, 1);
2579 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2580 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2581 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_cstr_off, 12)
2582 MSVCP_size_t __thiscall basic_string_wchar_find_cstr_off(
2583 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos)
2585 return basic_string_wchar_find_cstr_substr(this, find, pos,
2586 char_traits_wchar_length(find));
2589 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2590 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2591 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_cstr_substr, 16)
2592 MSVCP_size_t __thiscall basic_string_wchar_rfind_cstr_substr(
2593 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos, MSVCP_size_t len)
2595 const wchar_t *p, *end;
2597 TRACE("%p %s %lu %lu\n", this, debugstr_wn(find, len), pos, len);
2600 return pos<this->size ? pos : this->size;
2602 if(len > this->size)
2603 return basic_string_wchar_npos;
2605 if(pos > this->size-len+1)
2606 pos = this->size-len+1;
2608 for(p=end+pos; p>=end; p--) {
2609 if(*p==*find && !char_traits_wchar_compare(p, find, len))
2613 return basic_string_wchar_npos;
2616 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2617 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2618 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_off, 12)
2619 MSVCP_size_t __thiscall basic_string_wchar_rfind_off(
2620 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2622 return basic_string_wchar_rfind_cstr_substr(this, find->ptr, off, find->size);
2625 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2626 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2627 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_ch, 12)
2628 MSVCP_size_t __thiscall basic_string_wchar_rfind_ch(
2629 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t pos)
2631 return basic_string_wchar_rfind_cstr_substr(this, &ch, pos, 1);
2634 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2635 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2636 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_cstr_off, 12)
2637 MSVCP_size_t __thiscall basic_string_wchar_rfind_cstr_off(
2638 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos)
2640 return basic_string_wchar_rfind_cstr_substr(this, find, pos,
2641 char_traits_wchar_length(find));
2644 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2645 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2646 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of_cstr_substr, 16)
2647 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of_cstr_substr(
2648 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2650 const wchar_t *p, *end;
2652 TRACE("%p %p %lu %lu\n", this, find, off, len);
2654 if(off<this->size) {
2655 end = this->ptr+this->size;
2656 for(p=this->ptr+off; p<end; p++)
2657 if(!char_traits_wchar_find(find, len, p))
2661 return basic_string_wchar_npos;
2664 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2665 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2666 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of, 12)
2667 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of(
2668 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2670 return basic_string_wchar_find_first_not_of_cstr_substr(this,
2671 find->ptr, off, find->size);
2674 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2675 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2676 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of_ch, 12)
2677 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of_ch(
2678 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2680 return basic_string_wchar_find_first_not_of_cstr_substr(this, &ch, off, 1);
2683 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2684 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2685 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of_cstr, 12)
2686 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of_cstr(
2687 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2689 return basic_string_wchar_find_first_not_of_cstr_substr(
2690 this, find, off, char_traits_wchar_length(find));
2693 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2694 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2695 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of_cstr_substr, 16)
2696 MSVCP_size_t __thiscall basic_string_wchar_find_first_of_cstr_substr(
2697 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2699 const wchar_t *p, *end;
2701 TRACE("%p %p %lu %lu\n", this, find, off, len);
2703 if(len>0 && off<this->size) {
2704 end = this->ptr+this->size;
2705 for(p=this->ptr+off; p<end; p++)
2706 if(char_traits_wchar_find(find, len, p))
2710 return basic_string_wchar_npos;
2713 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2714 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2715 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of, 12)
2716 MSVCP_size_t __thiscall basic_string_wchar_find_first_of(
2717 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2719 return basic_string_wchar_find_first_of_cstr_substr(this,
2720 find->ptr, off, find->size);
2723 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2724 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2725 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of_ch, 12)
2726 MSVCP_size_t __thiscall basic_string_wchar_find_first_of_ch(
2727 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2729 return basic_string_wchar_find_first_of_cstr_substr(this, &ch, off, 1);
2732 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2733 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2734 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of_cstr, 12)
2735 MSVCP_size_t __thiscall basic_string_wchar_find_first_of_cstr(
2736 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2738 return basic_string_wchar_find_first_of_cstr_substr(
2739 this, find, off, char_traits_wchar_length(find));
2742 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2743 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2744 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of_cstr_substr, 16)
2745 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of_cstr_substr(
2746 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2748 const wchar_t *p, *beg;
2750 TRACE("%p %p %lu %lu\n", this, find, off, len);
2752 if(len>0 && this->size>0) {
2753 if(off >= this->size)
2757 for(p=beg+off; p>=beg; p--)
2758 if(!char_traits_wchar_find(find, len, p))
2762 return basic_string_wchar_npos;
2765 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2766 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2767 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of, 12)
2768 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of(
2769 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2771 return basic_string_wchar_find_last_not_of_cstr_substr(this,
2772 find->ptr, off, find->size);
2775 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2776 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2777 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of_ch, 12)
2778 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of_ch(
2779 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2781 return basic_string_wchar_find_last_not_of_cstr_substr(this, &ch, off, 1);
2784 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2785 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2786 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of_cstr, 12)
2787 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of_cstr(
2788 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2790 return basic_string_wchar_find_last_not_of_cstr_substr(
2791 this, find, off, char_traits_wchar_length(find));
2794 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2795 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2796 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of_cstr_substr, 16)
2797 MSVCP_size_t __thiscall basic_string_wchar_find_last_of_cstr_substr(
2798 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2800 const wchar_t *p, *beg;
2802 TRACE("%p %p %lu %lu\n", this, find, off, len);
2804 if(len>0 && this->size>0) {
2805 if(off >= this->size)
2809 for(p=beg+off; p>=beg; p--)
2810 if(char_traits_wchar_find(find, len, p))
2814 return basic_string_wchar_npos;
2817 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2818 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2819 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of, 12)
2820 MSVCP_size_t __thiscall basic_string_wchar_find_last_of(
2821 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2823 return basic_string_wchar_find_last_of_cstr_substr(this,
2824 find->ptr, off, find->size);
2827 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2828 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2829 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of_ch, 12)
2830 MSVCP_size_t __thiscall basic_string_wchar_find_last_of_ch(
2831 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2833 return basic_string_wchar_find_last_of_cstr_substr(this, &ch, off, 1);
2836 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2837 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2838 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of_cstr, 12)
2839 MSVCP_size_t __thiscall basic_string_wchar_find_last_of_cstr(
2840 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2842 return basic_string_wchar_find_last_of_cstr_substr(
2843 this, find, off, char_traits_wchar_length(find));
2846 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@II@Z */
2847 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
2848 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_substr, 16)
2849 basic_string_wchar* __thiscall basic_string_wchar_append_substr(basic_string_wchar *this,
2850 const basic_string_wchar *append, MSVCP_size_t offset, MSVCP_size_t count)
2852 TRACE("%p %p %lu %lu\n", this, append, offset, count);
2854 if(append->size < offset)
2857 if(count > append->size-offset)
2858 count = append->size-offset;
2860 if(basic_string_wchar_npos-this->size<=count || this->size+count<this->size)
2863 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2864 char_traits_wchar__Copy_s(this->ptr+this->size,
2865 this->res-this->size, append->ptr+offset, count);
2866 basic_string_wchar__Eos(this, this->size+count);
2872 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBGI@Z */
2873 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG_K@Z */
2874 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_cstr_len, 12)
2875 basic_string_wchar* __thiscall basic_string_wchar_append_cstr_len(
2876 basic_string_wchar *this, const wchar_t *append, MSVCP_size_t count)
2878 TRACE("%p %s %lu\n", this, debugstr_wn(append, count), count);
2880 if(basic_string_wchar_inside(this, append))
2881 return basic_string_wchar_append_substr(this, this, append-this->ptr, count);
2883 if(basic_string_wchar_npos-this->size<=count || this->size+count<this->size)
2886 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2887 char_traits_wchar__Copy_s(this->ptr+this->size,
2888 this->res-this->size, append, count);
2889 basic_string_wchar__Eos(this, this->size+count);
2895 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IG@Z */
2896 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KG@Z */
2897 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_len_ch, 12)
2898 basic_string_wchar* __thiscall basic_string_wchar_append_len_ch(
2899 basic_string_wchar *this, MSVCP_size_t count, wchar_t ch)
2901 TRACE("%p %lu %c\n", this, count, ch);
2903 if(basic_string_wchar_npos-this->size <= count)
2906 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2907 char_traits_wchar_assignn(this->ptr+this->size, count, ch);
2908 basic_string_wchar__Eos(this, this->size+count);
2914 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@@Z */
2915 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@@Z */
2916 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@ABV01@@Z */
2917 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@AEBV01@@Z */
2918 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append, 8)
2919 basic_string_wchar* __thiscall basic_string_wchar_append(
2920 basic_string_wchar *this, const basic_string_wchar *append)
2922 return basic_string_wchar_append_substr(this, append,
2923 0, basic_string_wchar_npos);
2926 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@G@Z */
2927 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@G@Z */
2928 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_ch, 8)
2929 basic_string_wchar* __thiscall basic_string_wchar_append_ch(
2930 basic_string_wchar *this, wchar_t ch)
2932 return basic_string_wchar_append_len_ch(this, 1, ch);
2935 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG0@Z */
2936 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG0@Z */
2937 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_beg_end, 12)
2938 basic_string_wchar* __thiscall basic_string_wchar_append_beg_end(
2939 basic_string_wchar *this, const wchar_t *beg, const wchar_t *end)
2941 return basic_string_wchar_append_cstr_len(this, beg, end-beg);
2944 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG@Z */
2945 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG@Z */
2946 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@PBG@Z */
2947 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@PEBG@Z */
2948 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_cstr, 8)
2949 basic_string_wchar* __thiscall basic_string_wchar_append_cstr(
2950 basic_string_wchar *this, const wchar_t *append)
2952 return basic_string_wchar_append_cstr_len(this, append,
2953 char_traits_wchar_length(append));
2955 /* ??$?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 */
2956 /* ??$?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 */
2957 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@0@Z */
2958 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@0@Z */
2959 basic_string_wchar* __cdecl basic_string_wchar_concatenate(basic_string_wchar *ret,
2960 const basic_string_wchar *left, const basic_string_wchar *right)
2962 TRACE("%p %p\n", left, right);
2964 basic_string_wchar_copy_ctor(ret, left);
2965 basic_string_wchar_append(ret, right);
2969 /* ??$?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 */
2970 /* ??$?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 */
2971 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@G@Z */
2972 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@G@Z */
2973 basic_string_wchar* __cdecl basic_string_wchar_concatenate_bstr_ch(basic_string_wchar *ret,
2974 const basic_string_wchar *left, wchar_t right)
2976 TRACE("%p %c\n", left, right);
2978 basic_string_wchar_copy_ctor(ret, left);
2979 basic_string_wchar_append_ch(ret, right);
2983 /* ??$?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 */
2984 /* ??$?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 */
2985 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@PBG@Z */
2986 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@PEBG@Z */
2987 basic_string_wchar* __cdecl basic_string_wchar_concatenate_bstr_cstr(basic_string_wchar *ret,
2988 const basic_string_wchar *left, const wchar_t *right)
2990 TRACE("%p %s\n", left, debugstr_w(right));
2992 basic_string_wchar_copy_ctor(ret, left);
2993 basic_string_wchar_append_cstr(ret, right);
2997 /* ??$?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 */
2998 /* ??$?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 */
2999 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GABV10@@Z */
3000 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GAEBV10@@Z */
3001 basic_string_wchar* __cdecl basic_string_wchar_concatenate_ch_bstr(basic_string_wchar *ret,
3002 wchar_t left, const basic_string_wchar *right)
3004 TRACE("%c %p\n", left, right);
3006 basic_string_wchar_ctor_cstr_len_alloc(ret, &left, 1, NULL);
3007 basic_string_wchar_append(ret, right);
3011 /* ??$?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 */
3012 /* ??$?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 */
3013 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBGABV10@@Z */
3014 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBGAEBV10@@Z */
3015 basic_string_wchar* __cdecl basic_string_wchar_concatenate_cstr_bstr(basic_string_wchar *ret,
3016 const wchar_t *left, const basic_string_wchar *right)
3018 TRACE("%s %p\n", debugstr_w(left), right);
3020 basic_string_wchar_ctor_cstr_alloc(ret, left, NULL);
3021 basic_string_wchar_append(ret, right);
3025 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGI@Z */
3026 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAG_K@Z */
3027 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEABGI@Z */
3028 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAAEBG_K@Z */
3029 DEFINE_THISCALL_WRAPPER(basic_string_wchar_operator_at, 8)
3030 wchar_t* __thiscall basic_string_wchar_operator_at(
3031 basic_string_wchar *this, MSVCP_size_t pos)
3033 TRACE("%p %lu\n", this, pos);
3035 assert(this->size >= pos);
3036 return this->ptr+pos;
3039 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGI@Z */
3040 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAG_K@Z */
3041 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEABGI@Z */
3042 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAAEBG_K@Z */
3043 DEFINE_THISCALL_WRAPPER(basic_string_wchar_at, 8)
3044 wchar_t* __thiscall basic_string_wchar_at(
3045 basic_string_wchar *this, MSVCP_size_t pos)
3047 TRACE("%p %lu\n", this, pos);
3049 if(this->size <= pos)
3052 return this->ptr+pos;
3055 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIPBGI@Z */
3056 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG0@Z */
3057 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_cstr_len, 20)
3058 basic_string_wchar* __thiscall basic_string_wchar_replace_cstr_len(basic_string_wchar *this,
3059 MSVCP_size_t off, MSVCP_size_t len, const wchar_t *str, MSVCP_size_t str_len)
3061 MSVCP_size_t inside_pos = -1;
3062 wchar_t *ptr = this->ptr;
3064 TRACE("%p %ld %ld %p %ld\n", this, off, len, str, str_len);
3066 if(this->size < off)
3069 if(len > this->size-off)
3070 len = this->size-off;
3072 if(basic_string_wchar_npos-str_len <= this->size-len)
3075 if(basic_string_wchar_inside(this, str))
3076 inside_pos = str-ptr;
3078 if(this->size-len+str_len)
3079 basic_string_wchar__Grow(this, this->size-len+str_len, FALSE);
3082 if(inside_pos == -1) {
3083 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3084 memcpy(ptr+off, str, str_len*sizeof(char));
3085 } else if(len >= str_len) {
3086 memmove(ptr+off, ptr+inside_pos, str_len*sizeof(char));
3087 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3091 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3093 if(inside_pos < off+len) {
3094 size = off+len-inside_pos;
3097 memmove(ptr+off, ptr+inside_pos, size*sizeof(char));
3103 memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(char));
3107 basic_string_wchar__Eos(this, this->size-len+str_len);
3111 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@II@Z */
3112 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0AEBV12@00@Z */
3113 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_substr, 24)
3114 basic_string_wchar* __thiscall basic_string_wchar_replace_substr(basic_string_wchar *this, MSVCP_size_t off,
3115 MSVCP_size_t len, const basic_string_wchar *str, MSVCP_size_t str_off, MSVCP_size_t str_len)
3117 if(str->size < str_off)
3120 if(str_len > str->size-str_off)
3121 str_len = str->size-str_off;
3123 return basic_string_wchar_replace_cstr_len(this, off, len,
3124 str->ptr+str_off, str_len);
3127 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@@Z */
3128 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0AEBV12@@Z */
3129 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace, 16)
3130 basic_string_wchar* __thiscall basic_string_wchar_replace(basic_string_wchar *this,
3131 MSVCP_size_t off, MSVCP_size_t len, const basic_string_wchar *str)
3133 return basic_string_wchar_replace_cstr_len(this, off, len,
3134 str->ptr, str->size);
3137 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIIG@Z */
3138 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K00G@Z */
3139 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_ch, 20)
3140 basic_string_wchar* __thiscall basic_string_wchar_replace_ch(basic_string_wchar *this,
3141 MSVCP_size_t off, MSVCP_size_t len, MSVCP_size_t count, wchar_t ch)
3145 TRACE("%p %ld %ld %ld %c\n", this, off, len, count, ch);
3147 if(this->size < off)
3150 if(len > this->size-off)
3151 len = this->size-off;
3153 if(basic_string_wchar_npos-count <= this->size-len)
3156 if(this->size-len+count)
3157 basic_string_wchar__Grow(this, this->size-len+count, FALSE);
3160 memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(char));
3161 char_traits_wchar_assignn(ptr+off, count, ch);
3162 basic_string_wchar__Eos(this, this->size-len+count);
3167 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIPBG@Z */
3168 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG@Z */
3169 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_cstr, 16)
3170 basic_string_wchar* __thiscall basic_string_wchar_replace_cstr(basic_string_wchar *this,
3171 MSVCP_size_t off, MSVCP_size_t len, const wchar_t *str)
3173 return basic_string_wchar_replace_cstr_len(this, off, len, str,
3174 char_traits_wchar_length(str));
3177 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0ABV12@@Z */
3178 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0AEBV12@@Z */
3179 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_bstr, 16)
3180 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_bstr(basic_string_wchar *this,
3181 wchar_t *beg, wchar_t *end, const basic_string_wchar *str)
3183 return basic_string_wchar_replace(this, basic_string_wchar__Pdif(beg, this->ptr),
3184 basic_string_wchar__Pdif(end, beg), str);
3187 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0IG@Z */
3188 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0_KG@Z */
3189 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_chn, 20)
3190 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_chn(basic_string_wchar *this,
3191 wchar_t *beg, wchar_t *end, MSVCP_size_t count, wchar_t ch)
3193 return basic_string_wchar_replace_ch(this, basic_string_wchar__Pdif(beg, this->ptr),
3194 basic_string_wchar__Pdif(end, beg), count, ch);
3197 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBG1@Z */
3198 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG1@Z */
3199 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_iter, 20)
3200 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_iter(basic_string_wchar *this,
3201 wchar_t *beg1, wchar_t *end1, const wchar_t *beg2, const wchar_t *end2)
3203 return basic_string_wchar_replace_cstr_len(this, basic_string_wchar__Pdif(beg1, this->ptr),
3204 basic_string_wchar__Pdif(end1, beg1), beg2, basic_string_wchar__Pdif(end2, beg2));
3207 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBG@Z */
3208 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG@Z */
3209 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr, 16)
3210 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr(basic_string_wchar *this,
3211 wchar_t *beg, wchar_t *end, const wchar_t *str)
3213 return basic_string_wchar_replace_cstr(this, basic_string_wchar__Pdif(beg, this->ptr),
3214 basic_string_wchar__Pdif(end, beg), str);
3217 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBGI@Z */
3218 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG_K@Z */
3219 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr_len, 20)
3220 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr_len(basic_string_wchar *this,
3221 wchar_t *beg, wchar_t *end, const wchar_t *str, MSVCP_size_t len)
3223 return basic_string_wchar_replace_cstr_len(this, basic_string_wchar__Pdif(beg, this->ptr),
3224 basic_string_wchar__Pdif(end, beg), str, len);
3227 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IABV12@@Z */
3228 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KAEBV12@@Z */
3229 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert, 12)
3230 basic_string_wchar* __thiscall basic_string_wchar_insert(basic_string_wchar *this,
3231 MSVCP_size_t off, const basic_string_wchar *str)
3233 return basic_string_wchar_replace(this, off, 0, str);
3236 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IABV12@II@Z */
3237 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KAEBV12@00@Z */
3238 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_substr, 20)
3239 basic_string_wchar* __thiscall basic_string_wchar_insert_substr(
3240 basic_string_wchar *this, MSVCP_size_t off, const basic_string_wchar *str,
3241 MSVCP_size_t str_off, MSVCP_size_t str_count)
3243 return basic_string_wchar_replace_substr(this, off, 0, str, str_off, str_count);
3246 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IPBG@Z */
3247 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KPEBG@Z */
3248 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_cstr, 12)
3249 basic_string_wchar* __thiscall basic_string_wchar_insert_cstr(
3250 basic_string_wchar *this, MSVCP_size_t off, const wchar_t *str)
3252 return basic_string_wchar_replace_cstr(this, off, 0, str);
3255 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IPBGI@Z */
3256 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KPEBG0@Z */
3257 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_cstr_len, 16)
3258 basic_string_wchar* __thiscall basic_string_wchar_insert_cstr_len(basic_string_wchar *this,
3259 MSVCP_size_t off, const wchar_t *str, MSVCP_size_t str_len)
3261 return basic_string_wchar_replace_cstr_len(this, off, 0, str, str_len);
3264 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIG@Z */
3265 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0G@Z */
3266 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_chn, 16)
3267 basic_string_wchar* __thiscall basic_string_wchar_insert_chn(basic_string_wchar *this,
3268 MSVCP_size_t off, MSVCP_size_t count, wchar_t ch)
3270 return basic_string_wchar_replace_ch(this, off, 0, count, ch);
3273 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAGG@Z */
3274 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAGG@Z */
3275 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter_ch, 12)
3276 wchar_t* __thiscall basic_string_wchar_insert_iter_ch(basic_string_wchar *this, wchar_t *pos, wchar_t ch)
3278 MSVCP_size_t off = basic_string_wchar__Pdif(pos, this->ptr);
3279 basic_string_wchar_insert_chn(this, off, 1, ch);
3280 return basic_string_wchar__Psum(this->ptr, off);
3283 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXPAGIG@Z */
3284 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXPEAG_KG@Z */
3285 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter_chn, 16)
3286 void __thiscall basic_string_wchar_insert_iter_chn(basic_string_wchar *this,
3287 wchar_t *pos, MSVCP_size_t n, wchar_t ch)
3289 basic_string_wchar_insert_chn(this, basic_string_wchar__Pdif(pos, this->ptr), n, ch);
3292 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXPAGPBG1@Z */
3293 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXPEAGPEBG1@Z */
3294 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter, 16)
3295 void __thiscall basic_string_wchar_insert_iter(basic_string_wchar *this,
3296 wchar_t *pos, const wchar_t *beg, const wchar_t *end)
3298 basic_string_wchar_insert_cstr_len(this, basic_string_wchar__Pdif(pos, this->ptr),
3299 beg, basic_string_wchar__Pdif(end, beg));
3302 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXIG@Z */
3303 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_KG@Z */
3304 DEFINE_THISCALL_WRAPPER(basic_string_wchar_resize_ch, 12)
3305 void __thiscall basic_string_wchar_resize_ch(
3306 basic_string_wchar *this, MSVCP_size_t size, wchar_t ch)
3308 TRACE("%p %lu %c\n", this, size, ch);
3310 if(size <= this->size)
3311 basic_string_wchar_erase(this, size, this->size);
3313 basic_string_wchar_append_len_ch(this, size-this->size, ch);
3316 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXI@Z */
3317 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_K@Z */
3318 DEFINE_THISCALL_WRAPPER(basic_string_wchar_resize, 8)
3319 void __thiscall basic_string_wchar_resize(
3320 basic_string_wchar *this, MSVCP_size_t size)
3322 basic_string_wchar_resize_ch(this, size, '\0');
3325 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGXZ */
3326 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGXZ */
3327 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3328 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3329 DEFINE_THISCALL_WRAPPER(basic_string_wchar_begin, 4)
3330 wchar_t* __thiscall basic_string_wchar_begin(basic_string_wchar *this)
3332 TRACE("(%p)\n", this);
3333 basic_string_wchar__Freeze(this);
3337 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGXZ */
3338 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGXZ */
3339 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3340 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3341 DEFINE_THISCALL_WRAPPER(basic_string_wchar_end, 4)
3342 wchar_t* __thiscall basic_string_wchar_end(basic_string_wchar *this)
3344 TRACE("(%p)\n", this);
3345 basic_string_wchar__Freeze(this);
3346 return this->ptr+this->size;
3349 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@PAGGAAGPAGH@2@XZ */
3350 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@PEAGGAEAGPEAG_J@2@XZ */
3351 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@PBGGABGPBGH@2@XZ */
3352 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@PEBGGAEBGPEBG_J@2@XZ */
3353 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rbegin, 8)
3354 String_reverse_iterator_wchar* __thiscall basic_string_wchar_rbegin(
3355 basic_string_wchar *this, String_reverse_iterator_wchar *ret)
3357 TRACE("(%p %p)\n", this, ret);
3358 ret->ptr = basic_string_wchar_end(this);
3362 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@PAGGAAGPAGH@2@XZ */
3363 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@PEAGGAEAGPEAG_J@2@XZ */
3364 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@PBGGABGPBGH@2@XZ */
3365 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@PEBGGAEBGPEBG_J@2@XZ */
3366 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rend, 8)
3367 String_reverse_iterator_wchar* __thiscall basic_string_wchar_rend(
3368 basic_string_wchar *this, String_reverse_iterator_wchar *ret)
3370 TRACE("(%p %p)\n", this, ret);
3371 ret->ptr = basic_string_wchar_begin(this);
3375 /* ?c_str@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3376 /* ?c_str@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3377 /* ?data@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3378 /* ?data@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3379 DEFINE_THISCALL_WRAPPER(basic_string_wchar_c_str, 4)
3380 const wchar_t* __thiscall basic_string_wchar_c_str(const basic_string_wchar *this)
3382 TRACE("%p\n", this);
3383 return this->ptr ? this->ptr : basic_string_wchar__Nullstr();
3386 /* ?size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3387 /* ?size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3388 /* ?length@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3389 /* ?length@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3390 DEFINE_THISCALL_WRAPPER(basic_string_wchar_length, 4)
3391 MSVCP_size_t __thiscall basic_string_wchar_length(const basic_string_wchar *this)
3393 TRACE("%p\n", this);
3397 /* ?max_size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3398 /* ?max_size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3399 DEFINE_THISCALL_WRAPPER(basic_string_wchar_max_size, 4)
3400 MSVCP_size_t __thiscall basic_string_wchar_max_size(const basic_string_wchar *this)
3402 TRACE("%p\n", this);
3403 return MSVCP_allocator_wchar_max_size(NULL)-1;
3406 /* ?capacity@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3407 /* ?capacity@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3408 DEFINE_THISCALL_WRAPPER(basic_string_wchar_capacity, 4)
3409 MSVCP_size_t __thiscall basic_string_wchar_capacity(basic_string_wchar *this)
3411 TRACE("%p\n", this);
3415 /* ?reserve@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXI@Z */
3416 /* ?reserve@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_K@Z */
3417 DEFINE_THISCALL_WRAPPER(basic_string_wchar_reserve, 8)
3418 void __thiscall basic_string_wchar_reserve(basic_string_wchar *this, MSVCP_size_t size)
3422 TRACE("%p %ld\n", this, size);
3428 basic_string_wchar__Grow(this, size, FALSE);
3429 basic_string_wchar__Eos(this, len);
3432 /* ?empty@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE_NXZ */
3433 /* ?empty@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_NXZ */
3434 DEFINE_THISCALL_WRAPPER(basic_string_wchar_empty, 4)
3435 MSVCP_bool __thiscall basic_string_wchar_empty(basic_string_wchar *this)
3437 TRACE("%p\n", this);
3438 return this->size == 0;
3441 /* ?swap@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXAAV12@@Z */
3442 /* ?swap@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXAEAV12@@Z */
3443 DEFINE_THISCALL_WRAPPER(basic_string_wchar_swap, 8)
3444 void __thiscall basic_string_wchar_swap(basic_string_wchar *this, basic_string_wchar *str)
3446 basic_string_wchar tmp;
3447 TRACE("%p %p\n", this, str);
3454 /* ?substr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV12@II@Z */
3455 /* ?substr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV12@_K0@Z */
3456 DEFINE_THISCALL_WRAPPER(basic_string_wchar_substr, 16)
3457 basic_string_wchar* __thiscall basic_string_wchar_substr(basic_string_wchar *this,
3458 basic_string_wchar *ret, MSVCP_size_t off, MSVCP_size_t len)
3460 TRACE("%p %lu %lu\n", this, off, len);
3462 basic_string_wchar_ctor_substr_alloc(ret, this, off, len, NULL);
3466 /* ?copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPAGII@Z */
3467 /* ?copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEAG_K1@Z */
3468 DEFINE_THISCALL_WRAPPER(basic_string_wchar_copy, 16)
3469 MSVCP_size_t __thiscall basic_string_wchar_copy(const basic_string_wchar *this,
3470 wchar_t *dest, MSVCP_size_t count, MSVCP_size_t off)
3472 TRACE("%p %p %lu %lu\n", this, dest, count, off);
3474 if(off > this->size)
3476 if(count > this->size-off)
3477 count = this->size-off;
3478 char_traits_wchar__Copy_s(dest, count, this->ptr+off, count);
3482 /* ?get_allocator@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$allocator@G@2@XZ */
3483 /* ?get_allocator@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$allocator@G@2@XZ */
3484 DEFINE_THISCALL_WRAPPER(basic_string_wchar_get_allocator, 8)
3485 allocator* __thiscall basic_string_wchar_get_allocator(const basic_string_wchar *this, allocator *ret)
3487 TRACE("%p\n", this);