2 * Copyright 2012 Piotr Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
29 #include "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(msvcp);
34 /* _String_iterator<char> and _String_const_iterator<char> class */
37 } String_reverse_iterator_char;
41 } String_reverse_iterator_wchar;
48 /* ?_Xran@std@@YAXXZ */
49 void __cdecl _Xran(void)
51 static const char msg[] = "invalid string position";
54 throw_exception(EXCEPTION_OUT_OF_RANGE, msg);
57 /* ?_Xlen@std@@YAXXZ */
58 void __cdecl _Xlen(void)
60 static const char msg[] = "string too long";
63 throw_exception(EXCEPTION_LENGTH_ERROR, msg);
66 static char* char_traits_char__Move_s(char *dest,
67 MSVCP_size_t size, const char *src, MSVCP_size_t count)
69 if(!dest || !src || size<count) {
72 _invalid_parameter(NULL, NULL, NULL, 0, 0);
76 return memmove(dest, src, count);
79 static char* char_traits_char__Copy_s(char *dest,
80 MSVCP_size_t size, const char *src, MSVCP_size_t count)
82 if(!dest || !src || size<count) {
85 _invalid_parameter(NULL, NULL, NULL, 0, 0);
89 return memcpy(dest, src, count);
92 static MSVCP_size_t char_traits_char_length(const char *str)
97 static char* char_traits_char_assignn(char *str, MSVCP_size_t num, char c)
99 return memset(str, c, num);
102 static int char_traits_char_compare(const char *s1,
103 const char *s2, MSVCP_size_t count)
105 int ret = memcmp(s1, s2, count);
106 return (ret>0 ? 1 : (ret<0 ? -1 : 0));
109 static const char* char_traits_char_find(const char *str,
110 MSVCP_size_t range, const char *c)
112 return memchr(str, *c, range);
115 static MSVCP_bool basic_string_char_inside(
116 basic_string_char *this, const char *ptr)
118 return ptr>=this->ptr && ptr<this->ptr+this->size;
121 /* ?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2IB */
122 /* ?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2_KB */
123 const MSVCP_size_t basic_string_char_npos = -1;
125 /* ?_C@?1??_Nullstr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPBDXZ@4DB */
126 /* ?_C@?1??_Nullstr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEBDXZ@4DB */
127 const char basic_string_char_nullbyte = '\0';
129 /* ?_Nullstr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPBDXZ */
130 /* ?_Nullstr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEBDXZ */
131 const char* __cdecl basic_string_char__Nullstr(void)
133 return &basic_string_char_nullbyte;
136 /* ?_Refcnt@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEAAEPBD@Z */
137 /* ?_Refcnt@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAAEAEPEBD@Z */
138 DEFINE_THISCALL_WRAPPER(basic_string_char__Refcnt, 8)
139 unsigned char* __thiscall basic_string_char__Refcnt(basic_string_char *this, const char *ptr)
141 TRACE("(%p %p)\n", this, ptr);
142 return (unsigned char*)ptr-1;
145 /* ?_Eos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXI@Z */
146 /* ?_Eos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAX_K@Z */
147 DEFINE_THISCALL_WRAPPER(basic_string_char__Eos, 8)
148 void __thiscall basic_string_char__Eos(basic_string_char *this, MSVCP_size_t len)
154 void basic_string_char_clear(basic_string_char *this)
156 basic_string_char__Eos(this, 0);
159 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEX_N@Z */
160 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAX_N@Z */
161 DEFINE_THISCALL_WRAPPER(basic_string_char__Tidy, 8)
162 void __thiscall basic_string_char__Tidy(basic_string_char *this, MSVCP_bool built)
164 TRACE("(%p %d)\n", this, built);
166 if(!this->ptr || !built);
167 else if(!this->ptr[-1] || (unsigned char)this->ptr[-1]==FROZEN)
168 MSVCP_allocator_char_deallocate(NULL, this->ptr, this->res+2);
172 memset(this, 0, sizeof(*this));
175 /* ?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAE_NI_N@Z */
176 /* ?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAA_N_K_N@Z */
177 DEFINE_THISCALL_WRAPPER(basic_string_char__Grow, 12)
178 MSVCP_bool __thiscall basic_string_char__Grow(basic_string_char *this, MSVCP_size_t new_size, MSVCP_bool trim)
182 basic_string_char__Tidy(this, TRUE);
184 basic_string_char__Eos(this, 0);
185 } else if(this->res<new_size || trim ||
186 (this->ptr && this->ptr[-1] && (unsigned char)this->ptr[-1]!=FROZEN)) {
187 MSVCP_size_t new_res = new_size, len = this->size;
190 if(!trim && this->ptr && !this->ptr[-1]) {
192 if(new_res/3 < this->res/2)
193 new_res = this->res + this->res/2;
196 ptr = MSVCP_allocator_char_allocate(this->allocator, new_res+2);
199 ptr = MSVCP_allocator_char_allocate(this->allocator, new_size+2);
202 ERR("Out of memory\n");
208 char_traits_char__Copy_s(ptr+1, new_size, this->ptr, this->size);
209 basic_string_char__Tidy(this, TRUE);
212 basic_string_char__Eos(this, len>new_res ? new_res : len);
218 /* ?_Split@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXXZ */
219 /* ?_Split@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAXXZ */
220 DEFINE_THISCALL_WRAPPER(basic_string_char__Split, 4)
221 void __thiscall basic_string_char__Split(basic_string_char *this)
226 TRACE("(%p)\n", this);
228 if(!this->ptr || !this->ptr[-1] || (unsigned char)this->ptr[-1]==FROZEN)
233 basic_string_char__Tidy(this, TRUE);
234 if(basic_string_char__Grow(this, len, FALSE)) {
235 char_traits_char__Copy_s(this->ptr, this->res, ptr, len);
236 basic_string_char__Eos(this, len);
240 /* ?_Freeze@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXXZ */
241 /* ?_Freeze@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAXXZ */
242 DEFINE_THISCALL_WRAPPER(basic_string_char__Freeze, 4)
243 void __thiscall basic_string_char__Freeze(basic_string_char *this)
245 TRACE("(%p)\n", this);
246 basic_string_char__Split(this);
248 this->ptr[-1] = FROZEN;
251 /* ?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXI@Z */
252 /* ?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAX_K@Z */
253 DEFINE_THISCALL_WRAPPER(basic_string_char__Copy, 8)
254 void __thiscall basic_string_char__Copy(basic_string_char *this, MSVCP_size_t copy_len)
256 TRACE("%p %lu\n", this, copy_len);
258 if(!basic_string_char__Grow(this, copy_len, FALSE))
260 basic_string_char__Eos(this, copy_len);
263 /* ?_Pdif@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAIPBD0@Z */
264 /* ?_Pdif@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CA_KPEBD0@Z */
265 MSVCP_size_t __cdecl basic_string_char__Pdif(const char *i1, const char *i2)
267 TRACE("(%p %p)\n", i1, i2);
268 return !i1 ? 0 : i1-i2;
271 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPADPADI@Z */
272 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEADPEAD_K@Z */
273 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPBDPBDI@Z */
274 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEBDPEBD_K@Z */
275 char* __cdecl basic_string_char__Psum(char *iter, MSVCP_size_t add)
277 TRACE("(%p %lu)\n", iter, add);
278 return iter ? iter+add : iter;
281 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z */
282 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0@Z */
283 DEFINE_THISCALL_WRAPPER(basic_string_char_erase, 12)
284 basic_string_char* __thiscall basic_string_char_erase(
285 basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t len)
287 TRACE("%p %lu %lu\n", this, pos, len);
292 if(len > this->size-pos)
293 len = this->size-pos;
296 basic_string_char__Split(this);
297 char_traits_char__Move_s(this->ptr+pos, this->res-pos,
298 this->ptr+pos+len, this->size-pos-len);
299 basic_string_char__Eos(this, this->size-len);
305 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPAD0@Z */
306 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEAD0@Z */
307 DEFINE_THISCALL_WRAPPER(basic_string_char_erase_iter, 12)
308 char* __thiscall basic_string_char_erase_iter(basic_string_char *this, char *beg, char *end)
310 MSVCP_size_t pos = basic_string_char__Pdif(beg, this->ptr);
311 basic_string_char_erase(this, pos, basic_string_char__Pdif(end, beg));
312 return basic_string_char__Psum(this->ptr, pos);
315 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPAD@Z */
316 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEAD@Z */
317 DEFINE_THISCALL_WRAPPER(basic_string_char_erase_beg, 8)
318 char* __thiscall basic_string_char_erase_beg(basic_string_char *this, char *beg)
320 MSVCP_size_t pos = beg-this->ptr;
321 basic_string_char_erase(this, pos, 1);
322 return this->ptr+pos;
325 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */
326 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
327 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_substr, 16)
328 basic_string_char* __thiscall basic_string_char_assign_substr(
329 basic_string_char *this, const basic_string_char *assign,
330 MSVCP_size_t pos, MSVCP_size_t len)
332 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
334 if(assign->size < pos)
337 if(len > assign->size-pos)
338 len = assign->size-pos;
341 basic_string_char_erase(this, pos+len, basic_string_char_npos);
342 basic_string_char_erase(this, 0, pos);
343 } else if(basic_string_char__Grow(this, len, FALSE)) {
344 char_traits_char__Copy_s(this->ptr, this->res,
345 assign->ptr+pos, len);
346 basic_string_char__Eos(this, len);
352 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z */
353 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z */
354 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_cstr_len, 12)
355 basic_string_char* __thiscall basic_string_char_assign_cstr_len(
356 basic_string_char *this, const char *str, MSVCP_size_t len)
358 TRACE("%p %s %lu\n", this, debugstr_an(str, len), len);
360 if(basic_string_char_inside(this, str))
361 return basic_string_char_assign_substr(this, this, str-this->ptr, len);
362 else if(basic_string_char__Grow(this, len, FALSE)) {
363 char_traits_char__Copy_s(this->ptr, this->res, str, len);
364 basic_string_char__Eos(this, len);
370 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */
371 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */
372 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z */
373 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@AEBV01@@Z */
374 DEFINE_THISCALL_WRAPPER(basic_string_char_assign, 8)
375 basic_string_char* __thiscall basic_string_char_assign(
376 basic_string_char *this, const basic_string_char *assign)
378 return basic_string_char_assign_substr(this, assign,
379 0, basic_string_char_npos);
382 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z */
383 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD@Z */
384 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z */
385 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@PEBD@Z */
386 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_cstr, 8)
387 basic_string_char* __thiscall basic_string_char_assign_cstr(
388 basic_string_char *this, const char *str)
390 return basic_string_char_assign_cstr_len(this, str,
391 char_traits_char_length(str));
394 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@D@Z */
395 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@D@Z */
396 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_ch, 8)
397 basic_string_char* __thiscall basic_string_char_assign_ch(
398 basic_string_char *this, char ch)
400 return basic_string_char_assign_cstr_len(this, &ch, 1);
403 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */
404 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KD@Z */
405 DEFINE_THISCALL_WRAPPER(basic_string_char_assignn, 12)
406 basic_string_char* __thiscall basic_string_char_assignn(
407 basic_string_char *this, MSVCP_size_t count, char ch)
409 TRACE("%p %ld %c\n", this, count, ch);
411 basic_string_char__Grow(this, count, FALSE);
412 char_traits_char_assignn(this->ptr, count, ch);
413 basic_string_char__Eos(this, count);
417 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD0@Z */
418 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD0@Z */
419 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_ptr_ptr, 12)
420 basic_string_char* __thiscall basic_string_char_assign_ptr_ptr(
421 basic_string_char *this, const char *first, const char *last)
423 return basic_string_char_assign_cstr_len(this, first, last-first);
426 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDIABV?$allocator@D@1@@Z */
427 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD_KAEBV?$allocator@D@1@@Z */
428 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_cstr_len_alloc, 16)
429 basic_string_char* __thiscall basic_string_char_ctor_cstr_len_alloc(
430 basic_string_char *this, const char *str, MSVCP_size_t len, const void *alloc)
432 TRACE("%p %s %ld\n", this, debugstr_an(str, len), len);
434 basic_string_char__Tidy(this, FALSE);
435 basic_string_char_assign_cstr_len(this, str, len);
439 basic_string_char* basic_string_char_ctor_cstr_len(basic_string_char *this, const char *str, MSVCP_size_t len)
441 return basic_string_char_ctor_cstr_len_alloc(this, str, len, NULL);
444 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@IIABV?$allocator@D@1@@Z */
445 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@_K1AEBV?$allocator@D@1@@Z */
446 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_substr_alloc, 20)
447 basic_string_char* __thiscall basic_string_char_ctor_substr_alloc(
448 basic_string_char *this, const basic_string_char *assign,
449 MSVCP_size_t pos, MSVCP_size_t len, const void *alloc)
451 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
453 basic_string_char__Tidy(this, FALSE);
454 basic_string_char_assign_substr(this, assign, pos, len);
458 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDABV?$allocator@D@1@@Z */
459 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBDAEBV?$allocator@D@1@@Z */
460 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_cstr_alloc, 12)
461 basic_string_char* __thiscall basic_string_char_ctor_cstr_alloc(
462 basic_string_char *this, const char *str, const void *alloc)
464 TRACE("%p %s\n", this, debugstr_a(str));
466 basic_string_char__Tidy(this, FALSE);
467 basic_string_char_assign_cstr(this, str);
471 basic_string_char* basic_string_char_ctor_cstr(
472 basic_string_char *this, const char *str)
474 return basic_string_char_ctor_cstr_alloc(this, str, NULL);
477 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@IDABV?$allocator@D@1@@Z */
478 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@_KDAEBV?$allocator@D@1@@Z */
479 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_ch_alloc, 16)
480 basic_string_char* __thiscall basic_string_char_ctor_ch_alloc(basic_string_char *this,
481 MSVCP_size_t count, char ch, const void *alloc)
483 TRACE("%p %ld %c\n", this, count, ch);
485 basic_string_char__Tidy(this, FALSE);
486 basic_string_char_assignn(this, count, ch);
490 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD0ABV?$allocator@D@1@@Z */
491 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD0AEBV?$allocator@D@1@@Z */
492 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_iter, 16)
493 basic_string_char* __thiscall basic_string_char_ctor_iter(basic_string_char *this,
494 const char *first, const char *last, allocator *alloc)
496 TRACE("(%p %p %p %p)\n", this, first, last, alloc);
498 basic_string_char__Tidy(this, FALSE);
499 basic_string_char_assign_cstr_len(this, first, basic_string_char__Pdif(last, first));
503 /* ??_F?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
504 /* ??_F?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
505 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor, 4)
506 basic_string_char* __thiscall basic_string_char_ctor(basic_string_char *this)
510 basic_string_char__Tidy(this, FALSE);
514 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$allocator@D@1@@Z */
515 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV?$allocator@D@1@@Z */
516 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_alloc, 8)
517 basic_string_char* __thiscall basic_string_char_ctor_alloc(
518 basic_string_char *this, const void *alloc)
520 TRACE("%p %p\n", this, alloc);
522 basic_string_char__Tidy(this, FALSE);
526 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z */
527 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@@Z */
528 DEFINE_THISCALL_WRAPPER(basic_string_char_copy_ctor, 8)
529 basic_string_char* __thiscall basic_string_char_copy_ctor(
530 basic_string_char *this, const basic_string_char *copy)
532 TRACE("%p %p\n", this, copy);
534 basic_string_char__Tidy(this, FALSE);
535 basic_string_char_assign(this, copy);
539 /* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ */
540 /* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@XZ */
541 DEFINE_THISCALL_WRAPPER(basic_string_char_dtor, 4)
542 void __thiscall basic_string_char_dtor(basic_string_char *this)
545 basic_string_char__Tidy(this, TRUE);
548 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIPBDI@Z */
549 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0PEBD0@Z */
550 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_substr_cstr_len, 20)
551 int __thiscall basic_string_char_compare_substr_cstr_len(
552 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
553 const char *str, MSVCP_size_t count)
557 TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_an(str, count), count);
562 if(num > this->size-pos)
563 num = this->size-pos;
565 ans = char_traits_char_compare(this->ptr+pos,
566 str, num>count ? count : num);
577 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHPBD@Z */
578 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAHPEBD@Z */
579 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_cstr, 8)
580 int __thiscall basic_string_char_compare_cstr(
581 const basic_string_char *this, const char *str)
583 return basic_string_char_compare_substr_cstr_len(this, 0, this->size,
584 str, char_traits_char_length(str));
587 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIABV12@II@Z */
588 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0AEBV12@00@Z */
589 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_substr_substr, 24)
590 int __thiscall basic_string_char_compare_substr_substr(
591 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
592 const basic_string_char *compare, MSVCP_size_t off, MSVCP_size_t count)
594 TRACE("%p %lu %lu %p %lu %lu\n", this, pos, num, compare, off, count);
596 if(compare->size < off)
599 if(count > compare->size-off)
600 count = compare->size-off;
602 return basic_string_char_compare_substr_cstr_len(this, pos, num,
603 compare->ptr+off, count);
606 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIABV12@@Z */
607 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0AEBV12@@Z */
608 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_substr, 16)
609 int __thiscall basic_string_char_compare_substr(
610 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
611 const basic_string_char *compare)
613 return basic_string_char_compare_substr_cstr_len(this, pos, num,
614 compare->ptr, compare->size);
617 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHABV12@@Z */
618 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAHAEBV12@@Z */
619 DEFINE_THISCALL_WRAPPER(basic_string_char_compare, 8)
620 int __thiscall basic_string_char_compare(
621 const basic_string_char *this, const basic_string_char *compare)
623 return basic_string_char_compare_substr_cstr_len(this, 0, this->size,
624 compare->ptr, compare->size);
627 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIPBD@Z */
628 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0PEBD@Z */
629 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_substr_cstr, 16)
630 int __thiscall basic_string_char_compare_substr_cstr(const basic_string_char *this,
631 MSVCP_size_t pos, MSVCP_size_t num, const char *str)
633 return basic_string_char_compare_substr_cstr_len(this, pos, num,
634 str, char_traits_char_length(str));
637 /* ??$?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 */
638 /* ??$?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 */
639 /* ??8std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
640 /* ??8std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
641 MSVCP_bool __cdecl basic_string_char_equal(
642 const basic_string_char *left, const basic_string_char *right)
644 return basic_string_char_compare(left, right) == 0;
647 /* ??$?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 */
648 /* ??$?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 */
649 /* ??8std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
650 /* ??8std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
651 MSVCP_bool __cdecl basic_string_char_equal_str_cstr(
652 const basic_string_char *left, const char *right)
654 return basic_string_char_compare_cstr(left, right) == 0;
657 /* ??$?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 */
658 /* ??$?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 */
659 /* ??8std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
660 /* ??8std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
661 MSVCP_bool __cdecl basic_string_char_equal_cstr_str(
662 const char *left, const basic_string_char *right)
664 return basic_string_char_compare_cstr(right, left) == 0;
667 /* ??$?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 */
668 /* ??$?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 */
669 /* ??9std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
670 /* ??9std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
671 MSVCP_bool __cdecl basic_string_char_not_equal(
672 const basic_string_char *left, const basic_string_char *right)
674 return basic_string_char_compare(left, right) != 0;
677 /* ??$?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 */
678 /* ??$?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 */
679 /* ??9std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
680 /* ??9std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
681 MSVCP_bool __cdecl basic_string_char_not_equal_str_cstr(
682 const basic_string_char *left, const char *right)
684 return basic_string_char_compare_cstr(left, right) != 0;
687 /* ??$?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 */
688 /* ??$?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 */
689 /* ??9std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
690 /* ??9std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
691 MSVCP_bool __cdecl basic_string_char_not_equal_cstr_str(
692 const char *left, const basic_string_char *right)
694 return basic_string_char_compare_cstr(right, left) != 0;
697 /* ??$?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 */
698 /* ??$?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 */
699 /* ??Mstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
700 /* ??Mstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
701 MSVCP_bool __cdecl basic_string_char_lower(
702 const basic_string_char *left, const basic_string_char *right)
704 return basic_string_char_compare(left, right) < 0;
707 /* ??$?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 */
708 /* ??$?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 */
709 /* ??Mstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
710 /* ??Mstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
711 MSVCP_bool __cdecl basic_string_char_lower_bstr_cstr(
712 const basic_string_char *left, const char *right)
714 return basic_string_char_compare_cstr(left, right) < 0;
717 /* ??$?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 */
718 /* ??$?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 */
719 /* ??Mstd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
720 /* ??Mstd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
721 MSVCP_bool __cdecl basic_string_char_lower_cstr_bstr(
722 const char *left, const basic_string_char *right)
724 return basic_string_char_compare_cstr(right, left) > 0;
727 /* ??$?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 */
728 /* ??$?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 */
729 /* ??Nstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
730 /* ??Nstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
731 MSVCP_bool __cdecl basic_string_char_leq(
732 const basic_string_char *left, const basic_string_char *right)
734 return basic_string_char_compare(left, right) <= 0;
737 /* ??$?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 */
738 /* ??$?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 */
739 /* ??Nstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
740 /* ??Nstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
741 MSVCP_bool __cdecl basic_string_char_leq_bstr_cstr(
742 const basic_string_char *left, const char *right)
744 return basic_string_char_compare_cstr(left, right) <= 0;
747 /* ??$?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 */
748 /* ??$?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 */
749 /* ??Nstd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
750 /* ??Nstd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
751 MSVCP_bool __cdecl basic_string_char_leq_cstr_bstr(
752 const char *left, const basic_string_char *right)
754 return basic_string_char_compare_cstr(right, left) >= 0;
757 /* ??$?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 */
758 /* ??$?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 */
759 /* ??Ostd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
760 /* ??Ostd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
761 MSVCP_bool __cdecl basic_string_char_greater(
762 const basic_string_char *left, const basic_string_char *right)
764 return basic_string_char_compare(left, right) > 0;
767 /* ??$?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 */
768 /* ??$?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 */
769 /* ??Ostd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
770 /* ??Ostd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
771 MSVCP_bool __cdecl basic_string_char_greater_bstr_cstr(
772 const basic_string_char *left, const char *right)
774 return basic_string_char_compare_cstr(left, right) > 0;
777 /* ??$?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 */
778 /* ??$?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 */
779 /* ??Ostd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
780 /* ??Ostd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
781 MSVCP_bool __cdecl basic_string_char_greater_cstr_bstr(
782 const char *left, const basic_string_char *right)
784 return basic_string_char_compare_cstr(right, left) < 0;
787 /* ??$?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 */
788 /* ??$?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 */
789 /* ??Pstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
790 /* ??Pstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
791 MSVCP_bool __cdecl basic_string_char_geq(
792 const basic_string_char *left, const basic_string_char *right)
794 return basic_string_char_compare(left, right) >= 0;
797 /* ??$?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 */
798 /* ??$?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 */
799 /* ??Pstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
800 /* ??Pstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
801 MSVCP_bool __cdecl basic_string_char_geq_bstr_cstr(
802 const basic_string_char *left, const char *right)
804 return basic_string_char_compare_cstr(left, right) >= 0;
807 /* ??$?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 */
808 /* ??$?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 */
809 /* ??Pstd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
810 /* ??Pstd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
811 MSVCP_bool __cdecl basic_string_char_geq_cstr_bstr(
812 const char *left, const basic_string_char *right)
814 return basic_string_char_compare_cstr(right, left) <= 0;
817 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
818 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
819 DEFINE_THISCALL_WRAPPER(basic_string_char_find_cstr_substr, 16)
820 MSVCP_size_t __thiscall basic_string_char_find_cstr_substr(
821 const basic_string_char *this, const char *find, MSVCP_size_t pos, MSVCP_size_t len)
825 TRACE("%p %s %lu %lu\n", this, debugstr_an(find, len), pos, len);
827 if(len==0 && pos<=this->size)
830 end = this->ptr+this->size-len+1;
831 for(p=this->ptr+pos; p<end; p++) {
832 p = char_traits_char_find(p, end-p, find);
836 if(!char_traits_char_compare(p, find, len))
840 return basic_string_char_npos;
843 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
844 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
845 DEFINE_THISCALL_WRAPPER(basic_string_char_find_off, 12)
846 MSVCP_size_t __thiscall basic_string_char_find_off(
847 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
849 return basic_string_char_find_cstr_substr(this, find->ptr, off, find->size);
852 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
853 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
854 DEFINE_THISCALL_WRAPPER(basic_string_char_find_ch, 12)
855 MSVCP_size_t __thiscall basic_string_char_find_ch(
856 const basic_string_char *this, char ch, MSVCP_size_t pos)
858 return basic_string_char_find_cstr_substr(this, &ch, pos, 1);
861 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
862 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
863 DEFINE_THISCALL_WRAPPER(basic_string_char_find_cstr_off, 12)
864 MSVCP_size_t __thiscall basic_string_char_find_cstr_off(
865 const basic_string_char *this, const char *find, MSVCP_size_t pos)
867 return basic_string_char_find_cstr_substr(this, find, pos,
868 char_traits_char_length(find));
871 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
872 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
873 DEFINE_THISCALL_WRAPPER(basic_string_char_rfind_cstr_substr, 16)
874 MSVCP_size_t __thiscall basic_string_char_rfind_cstr_substr(
875 const basic_string_char *this, const char *find, MSVCP_size_t pos, MSVCP_size_t len)
879 TRACE("%p %s %lu %lu\n", this, debugstr_an(find, len), pos, len);
882 return pos<this->size ? pos : this->size;
885 return basic_string_char_npos;
887 if(pos > this->size-len+1)
888 pos = this->size-len+1;
890 for(p=end+pos-1; p>=end; p--) {
891 if(*p==*find && !char_traits_char_compare(p, find, len))
895 return basic_string_char_npos;
898 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
899 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
900 DEFINE_THISCALL_WRAPPER(basic_string_char_rfind_off, 12)
901 MSVCP_size_t __thiscall basic_string_char_rfind_off(
902 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
904 return basic_string_char_rfind_cstr_substr(this, find->ptr, off, find->size);
907 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
908 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
909 DEFINE_THISCALL_WRAPPER(basic_string_char_rfind_ch, 12)
910 MSVCP_size_t __thiscall basic_string_char_rfind_ch(
911 const basic_string_char *this, char ch, MSVCP_size_t pos)
913 return basic_string_char_rfind_cstr_substr(this, &ch, pos, 1);
916 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
917 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
918 DEFINE_THISCALL_WRAPPER(basic_string_char_rfind_cstr_off, 12)
919 MSVCP_size_t __thiscall basic_string_char_rfind_cstr_off(
920 const basic_string_char *this, const char *find, MSVCP_size_t pos)
922 return basic_string_char_rfind_cstr_substr(this, find, pos,
923 char_traits_char_length(find));
926 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
927 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
928 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_not_of_cstr_substr, 16)
929 MSVCP_size_t __thiscall basic_string_char_find_first_not_of_cstr_substr(
930 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
934 TRACE("%p %p %lu %lu\n", this, find, off, len);
937 end = this->ptr+this->size;
938 for(p=this->ptr+off; p<end; p++)
939 if(!char_traits_char_find(find, len, p))
943 return basic_string_char_npos;
946 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
947 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
948 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_not_of, 12)
949 MSVCP_size_t __thiscall basic_string_char_find_first_not_of(
950 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
952 return basic_string_char_find_first_not_of_cstr_substr(this,
953 find->ptr, off, find->size);
956 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
957 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
958 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_not_of_ch, 12)
959 MSVCP_size_t __thiscall basic_string_char_find_first_not_of_ch(
960 const basic_string_char *this, char ch, MSVCP_size_t off)
962 return basic_string_char_find_first_not_of_cstr_substr(this, &ch, off, 1);
965 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
966 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
967 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_not_of_cstr, 12)
968 MSVCP_size_t __thiscall basic_string_char_find_first_not_of_cstr(
969 const basic_string_char *this, const char *find, MSVCP_size_t off)
971 return basic_string_char_find_first_not_of_cstr_substr(
972 this, find, off, char_traits_char_length(find));
975 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
976 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
977 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_of_cstr_substr, 16)
978 MSVCP_size_t __thiscall basic_string_char_find_first_of_cstr_substr(
979 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
983 TRACE("%p %p %lu %lu\n", this, find, off, len);
985 if(len>0 && off<this->size) {
986 end = this->ptr+this->size;
987 for(p=this->ptr+off; p<end; p++)
988 if(char_traits_char_find(find, len, p))
992 return basic_string_char_npos;
995 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
996 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
997 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_of, 12)
998 MSVCP_size_t __thiscall basic_string_char_find_first_of(
999 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1001 return basic_string_char_find_first_of_cstr_substr(this,
1002 find->ptr, off, find->size);
1005 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1006 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1007 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_of_ch, 12)
1008 MSVCP_size_t __thiscall basic_string_char_find_first_of_ch(
1009 const basic_string_char *this, char ch, MSVCP_size_t off)
1011 return basic_string_char_find_first_of_cstr_substr(this, &ch, off, 1);
1014 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1015 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1016 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_of_cstr, 12)
1017 MSVCP_size_t __thiscall basic_string_char_find_first_of_cstr(
1018 const basic_string_char *this, const char *find, MSVCP_size_t off)
1020 return basic_string_char_find_first_of_cstr_substr(
1021 this, find, off, char_traits_char_length(find));
1024 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1025 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1026 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_not_of_cstr_substr, 16)
1027 MSVCP_size_t __thiscall basic_string_char_find_last_not_of_cstr_substr(
1028 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
1030 const char *p, *beg;
1032 TRACE("%p %p %lu %lu\n", this, find, off, len);
1034 if(len>0 && this->size>0) {
1035 if(off >= this->size)
1039 for(p=beg+off; p>=beg; p--)
1040 if(!char_traits_char_find(find, len, p))
1044 return basic_string_char_npos;
1047 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1048 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1049 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_not_of, 12)
1050 MSVCP_size_t __thiscall basic_string_char_find_last_not_of(
1051 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1053 return basic_string_char_find_last_not_of_cstr_substr(this,
1054 find->ptr, off, find->size);
1057 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1058 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1059 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_not_of_ch, 12)
1060 MSVCP_size_t __thiscall basic_string_char_find_last_not_of_ch(
1061 const basic_string_char *this, char ch, MSVCP_size_t off)
1063 return basic_string_char_find_last_not_of_cstr_substr(this, &ch, off, 1);
1066 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1067 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1068 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_not_of_cstr, 12)
1069 MSVCP_size_t __thiscall basic_string_char_find_last_not_of_cstr(
1070 const basic_string_char *this, const char *find, MSVCP_size_t off)
1072 return basic_string_char_find_last_not_of_cstr_substr(
1073 this, find, off, char_traits_char_length(find));
1076 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1077 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1078 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_of_cstr_substr, 16)
1079 MSVCP_size_t __thiscall basic_string_char_find_last_of_cstr_substr(
1080 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
1082 const char *p, *beg;
1084 TRACE("%p %p %lu %lu\n", this, find, off, len);
1086 if(len>0 && this->size>0) {
1087 if(off >= this->size)
1091 for(p=beg+off; p>=beg; p--)
1092 if(char_traits_char_find(find, len, p))
1096 return basic_string_char_npos;
1099 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1100 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1101 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_of, 12)
1102 MSVCP_size_t __thiscall basic_string_char_find_last_of(
1103 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1105 return basic_string_char_find_last_of_cstr_substr(this,
1106 find->ptr, off, find->size);
1109 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1110 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1111 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_of_ch, 12)
1112 MSVCP_size_t __thiscall basic_string_char_find_last_of_ch(
1113 const basic_string_char *this, char ch, MSVCP_size_t off)
1115 return basic_string_char_find_last_of_cstr_substr(this, &ch, off, 1);
1118 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1119 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1120 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_of_cstr, 12)
1121 MSVCP_size_t __thiscall basic_string_char_find_last_of_cstr(
1122 const basic_string_char *this, const char *find, MSVCP_size_t off)
1124 return basic_string_char_find_last_of_cstr_substr(
1125 this, find, off, char_traits_char_length(find));
1128 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */
1129 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
1130 DEFINE_THISCALL_WRAPPER(basic_string_char_append_substr, 16)
1131 basic_string_char* __thiscall basic_string_char_append_substr(basic_string_char *this,
1132 const basic_string_char *append, MSVCP_size_t offset, MSVCP_size_t count)
1134 TRACE("%p %p %lu %lu\n", this, append, offset, count);
1136 if(append->size < offset)
1139 if(count > append->size-offset)
1140 count = append->size-offset;
1142 if(basic_string_char_npos-this->size<=count || this->size+count<this->size)
1145 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1146 char_traits_char__Copy_s(this->ptr+this->size,
1147 this->res-this->size, append->ptr+offset, count);
1148 basic_string_char__Eos(this, this->size+count);
1154 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z */
1155 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z */
1156 DEFINE_THISCALL_WRAPPER(basic_string_char_append_cstr_len, 12)
1157 basic_string_char* __thiscall basic_string_char_append_cstr_len(
1158 basic_string_char *this, const char *append, MSVCP_size_t count)
1160 TRACE("%p %s %lu\n", this, debugstr_an(append, count), count);
1162 if(basic_string_char_inside(this, append))
1163 return basic_string_char_append_substr(this, this, append-this->ptr, count);
1165 if(basic_string_char_npos-this->size<=count || this->size+count<this->size)
1168 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1169 char_traits_char__Copy_s(this->ptr+this->size,
1170 this->res-this->size, append, count);
1171 basic_string_char__Eos(this, this->size+count);
1177 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */
1178 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KD@Z */
1179 DEFINE_THISCALL_WRAPPER(basic_string_char_append_len_ch, 12)
1180 basic_string_char* __thiscall basic_string_char_append_len_ch(
1181 basic_string_char *this, MSVCP_size_t count, char ch)
1183 TRACE("%p %lu %c\n", this, count, ch);
1185 if(basic_string_char_npos-this->size <= count)
1188 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1189 char_traits_char_assignn(this->ptr+this->size, count, ch);
1190 basic_string_char__Eos(this, this->size+count);
1196 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */
1197 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */
1198 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z */
1199 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@AEBV01@@Z */
1200 DEFINE_THISCALL_WRAPPER(basic_string_char_append, 8)
1201 basic_string_char* __thiscall basic_string_char_append(
1202 basic_string_char *this, const basic_string_char *append)
1204 return basic_string_char_append_substr(this, append,
1205 0, basic_string_char_npos);
1208 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@D@Z */
1209 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@D@Z */
1210 DEFINE_THISCALL_WRAPPER(basic_string_char_append_ch, 8)
1211 basic_string_char* __thiscall basic_string_char_append_ch(
1212 basic_string_char *this, char ch)
1214 return basic_string_char_append_len_ch(this, 1, ch);
1217 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD0@Z */
1218 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD0@Z */
1219 DEFINE_THISCALL_WRAPPER(basic_string_char_append_beg_end, 12)
1220 basic_string_char* __thiscall basic_string_char_append_beg_end(
1221 basic_string_char *this, const char *beg, const char *end)
1223 return basic_string_char_append_cstr_len(this, beg, end-beg);
1226 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z */
1227 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD@Z */
1228 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z */
1229 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@PEBD@Z */
1230 DEFINE_THISCALL_WRAPPER(basic_string_char_append_cstr, 8)
1231 basic_string_char* __thiscall basic_string_char_append_cstr(
1232 basic_string_char *this, const char *append)
1234 return basic_string_char_append_cstr_len(this, append,
1235 char_traits_char_length(append));
1237 /* ??$?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 */
1238 /* ??$?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 */
1239 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z */
1240 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@0@Z */
1241 basic_string_char* __cdecl basic_string_char_concatenate(basic_string_char *ret,
1242 const basic_string_char *left, const basic_string_char *right)
1244 TRACE("%p %p\n", left, right);
1246 basic_string_char_copy_ctor(ret, left);
1247 basic_string_char_append(ret, right);
1251 /* ??$?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 */
1252 /* ??$?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 */
1253 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@D@Z */
1254 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@D@Z */
1255 basic_string_char* __cdecl basic_string_char_concatenate_bstr_ch(basic_string_char *ret,
1256 const basic_string_char *left, char right)
1258 TRACE("%p %c\n", left, right);
1260 basic_string_char_copy_ctor(ret, left);
1261 basic_string_char_append_ch(ret, right);
1265 /* ??$?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 */
1266 /* ??$?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 */
1267 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z */
1268 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@PEBD@Z */
1269 basic_string_char* __cdecl basic_string_char_concatenate_bstr_cstr(basic_string_char *ret,
1270 const basic_string_char *left, const char *right)
1272 TRACE("%p %s\n", left, debugstr_a(right));
1274 basic_string_char_copy_ctor(ret, left);
1275 basic_string_char_append_cstr(ret, right);
1279 /* ??$?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 */
1280 /* ??$?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 */
1281 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DABV10@@Z */
1282 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DAEBV10@@Z */
1283 basic_string_char* __cdecl basic_string_char_concatenate_ch_bstr(basic_string_char *ret,
1284 char left, const basic_string_char *right)
1286 TRACE("%c %p\n", left, right);
1288 basic_string_char_ctor_cstr_len_alloc(ret, &left, 1, NULL);
1289 basic_string_char_append(ret, right);
1293 /* ??$?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 */
1294 /* ??$?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 */
1295 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z */
1296 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBDAEBV10@@Z */
1297 basic_string_char* __cdecl basic_string_char_concatenate_cstr_bstr(basic_string_char *ret,
1298 const char *left, const basic_string_char *right)
1300 TRACE("%s %p\n", debugstr_a(left), right);
1302 basic_string_char_ctor_cstr_alloc(ret, left, NULL);
1303 basic_string_char_append(ret, right);
1307 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */
1308 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */
1309 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */
1310 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */
1311 DEFINE_THISCALL_WRAPPER(basic_string_char_operator_at, 8)
1312 char* __thiscall basic_string_char_operator_at(
1313 basic_string_char *this, MSVCP_size_t pos)
1315 TRACE("%p %lu\n", this, pos);
1317 assert(this->size >= pos);
1318 return this->ptr+pos;
1321 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */
1322 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */
1323 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */
1324 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */
1325 DEFINE_THISCALL_WRAPPER(basic_string_char_at, 8)
1326 char* __thiscall basic_string_char_at(
1327 basic_string_char *this, MSVCP_size_t pos)
1329 TRACE("%p %lu\n", this, pos);
1331 if(this->size <= pos)
1334 return this->ptr+pos;
1337 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBDI@Z */
1338 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD0@Z */
1339 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_cstr_len, 20)
1340 basic_string_char* __thiscall basic_string_char_replace_cstr_len(basic_string_char *this,
1341 MSVCP_size_t off, MSVCP_size_t len, const char *str, MSVCP_size_t str_len)
1343 MSVCP_size_t inside_pos = -1;
1344 char *ptr = this->ptr;
1346 TRACE("%p %ld %ld %p %ld\n", this, off, len, str, str_len);
1348 if(this->size < off)
1351 if(len > this->size-off)
1352 len = this->size-off;
1354 if(basic_string_char_npos-str_len <= this->size-len)
1357 if(basic_string_char_inside(this, str))
1358 inside_pos = str-ptr;
1360 if(this->size-len+str_len)
1361 basic_string_char__Grow(this, this->size-len+str_len, FALSE);
1364 if(inside_pos == -1) {
1365 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1366 memcpy(ptr+off, str, str_len*sizeof(char));
1367 } else if(len >= str_len) {
1368 memmove(ptr+off, ptr+inside_pos, str_len*sizeof(char));
1369 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1373 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1375 if(inside_pos < off+len) {
1376 size = off+len-inside_pos;
1379 memmove(ptr+off, ptr+inside_pos, size*sizeof(char));
1385 memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(char));
1388 basic_string_char__Eos(this, this->size-len+str_len);
1392 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@II@Z */
1393 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0AEBV12@00@Z */
1394 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_substr, 24)
1395 basic_string_char* __thiscall basic_string_char_replace_substr(basic_string_char *this, MSVCP_size_t off,
1396 MSVCP_size_t len, const basic_string_char *str, MSVCP_size_t str_off, MSVCP_size_t str_len)
1398 if(str->size < str_off)
1401 if(str_len > str->size-str_off)
1402 str_len = str->size-str_off;
1404 return basic_string_char_replace_cstr_len(this, off, len,
1405 str->ptr+str_off, str_len);
1408 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@@Z */
1409 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0AEBV12@@Z */
1410 DEFINE_THISCALL_WRAPPER(basic_string_char_replace, 16)
1411 basic_string_char* __thiscall basic_string_char_replace(basic_string_char *this,
1412 MSVCP_size_t off, MSVCP_size_t len, const basic_string_char *str)
1414 return basic_string_char_replace_cstr_len(this, off, len,
1415 str->ptr, str->size);
1418 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIID@Z */
1419 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K00D@Z */
1420 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_ch, 20)
1421 basic_string_char* __thiscall basic_string_char_replace_ch(basic_string_char *this,
1422 MSVCP_size_t off, MSVCP_size_t len, MSVCP_size_t count, char ch)
1426 TRACE("%p %ld %ld %ld %c\n", this, off, len, count, ch);
1428 if(this->size < off)
1431 if(len > this->size-off)
1432 len = this->size-off;
1434 if(basic_string_char_npos-count <= this->size-len)
1437 if(this->size-len+count)
1438 basic_string_char__Grow(this, this->size-len+count, FALSE);
1441 memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(char));
1442 char_traits_char_assignn(ptr+off, count, ch);
1443 basic_string_char__Eos(this, this->size-len+count);
1448 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBD@Z */
1449 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD@Z */
1450 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_cstr, 16)
1451 basic_string_char* __thiscall basic_string_char_replace_cstr(basic_string_char *this,
1452 MSVCP_size_t off, MSVCP_size_t len, const char *str)
1454 return basic_string_char_replace_cstr_len(this, off, len, str,
1455 char_traits_char_length(str));
1458 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0ABV12@@Z */
1459 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0AEBV12@@Z */
1460 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_bstr, 16)
1461 basic_string_char* __thiscall basic_string_char_replace_iter_bstr(basic_string_char *this,
1462 char *beg, char *end, const basic_string_char *str)
1464 return basic_string_char_replace(this, basic_string_char__Pdif(beg, this->ptr),
1465 basic_string_char__Pdif(end, beg), str);
1468 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0ID@Z */
1469 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0_KD@Z */
1470 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_chn, 20)
1471 basic_string_char* __thiscall basic_string_char_replace_iter_chn(basic_string_char *this,
1472 char *beg, char *end, MSVCP_size_t count, char ch)
1474 return basic_string_char_replace_ch(this, basic_string_char__Pdif(beg, this->ptr),
1475 basic_string_char__Pdif(end, beg), count, ch);
1478 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBD1@Z */
1479 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD1@Z */
1480 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_iter, 20)
1481 basic_string_char* __thiscall basic_string_char_replace_iter_iter(basic_string_char *this,
1482 char *beg1, char *end1, const char *beg2, const char *end2)
1484 return basic_string_char_replace_cstr_len(this, basic_string_char__Pdif(beg1, this->ptr),
1485 basic_string_char__Pdif(end1, beg1), beg2, basic_string_char__Pdif(end2, beg2));
1488 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBD@Z */
1489 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD@Z */
1490 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr, 16)
1491 basic_string_char* __thiscall basic_string_char_replace_iter_cstr(basic_string_char *this,
1492 char *beg, char *end, const char *str)
1494 return basic_string_char_replace_cstr(this, basic_string_char__Pdif(beg, this->ptr),
1495 basic_string_char__Pdif(end, beg), str);
1498 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBDI@Z */
1499 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD_K@Z */
1500 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr_len, 20)
1501 basic_string_char* __thiscall basic_string_char_replace_iter_cstr_len(basic_string_char *this,
1502 char *beg, char *end, const char *str, MSVCP_size_t len)
1504 return basic_string_char_replace_cstr_len(this, basic_string_char__Pdif(beg, this->ptr),
1505 basic_string_char__Pdif(end, beg), str, len);
1508 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IABV12@@Z */
1509 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KAEBV12@@Z */
1510 DEFINE_THISCALL_WRAPPER(basic_string_char_insert, 12)
1511 basic_string_char* __thiscall basic_string_char_insert(basic_string_char *this,
1512 MSVCP_size_t off, const basic_string_char *str)
1514 return basic_string_char_replace(this, off, 0, str);
1517 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IABV12@II@Z */
1518 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KAEBV12@00@Z */
1519 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_substr, 20)
1520 basic_string_char* __thiscall basic_string_char_insert_substr(
1521 basic_string_char *this, MSVCP_size_t off, const basic_string_char *str,
1522 MSVCP_size_t str_off, MSVCP_size_t str_count)
1524 return basic_string_char_replace_substr(this, off, 0, str, str_off, str_count);
1527 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IPBD@Z */
1528 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KPEBD@Z */
1529 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_cstr, 12)
1530 basic_string_char* __thiscall basic_string_char_insert_cstr(
1531 basic_string_char *this, MSVCP_size_t off, const char *str)
1533 return basic_string_char_replace_cstr(this, off, 0, str);
1536 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IPBDI@Z */
1537 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KPEBD0@Z */
1538 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_cstr_len, 16)
1539 basic_string_char* __thiscall basic_string_char_insert_cstr_len(basic_string_char *this,
1540 MSVCP_size_t off, const char *str, MSVCP_size_t str_len)
1542 return basic_string_char_replace_cstr_len(this, off, 0, str, str_len);
1545 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IID@Z */
1546 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0D@Z */
1547 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_chn, 16)
1548 basic_string_char* __thiscall basic_string_char_insert_chn(basic_string_char *this,
1549 MSVCP_size_t off, MSVCP_size_t count, char ch)
1551 return basic_string_char_replace_ch(this, off, 0, count, ch);
1554 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPADD@Z */
1555 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEADD@Z */
1556 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter_ch, 12)
1557 char* __thiscall basic_string_char_insert_iter_ch(basic_string_char *this, char *pos, char ch)
1559 MSVCP_size_t off = basic_string_char__Pdif(pos, this->ptr);
1560 basic_string_char_insert_chn(this, off, 1, ch);
1561 return basic_string_char__Psum(this->ptr, off);
1564 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXPADID@Z */
1565 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXPEAD_KD@Z */
1566 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter_chn, 16)
1567 void __thiscall basic_string_char_insert_iter_chn(basic_string_char *this,
1568 char *pos, MSVCP_size_t n, char ch)
1570 basic_string_char_insert_chn(this, basic_string_char__Pdif(pos, this->ptr), n, ch);
1573 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXPADPBD1@Z */
1574 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXPEADPEBD1@Z */
1575 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter, 16)
1576 void __thiscall basic_string_char_insert_iter(basic_string_char *this,
1577 char *pos, const char *beg, const char *end)
1579 basic_string_char_insert_cstr_len(this, basic_string_char__Pdif(pos, this->ptr),
1580 beg, basic_string_char__Pdif(end, beg));
1583 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXID@Z */
1584 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_KD@Z */
1585 DEFINE_THISCALL_WRAPPER(basic_string_char_resize_ch, 12)
1586 void __thiscall basic_string_char_resize_ch(
1587 basic_string_char *this, MSVCP_size_t size, char ch)
1589 TRACE("%p %lu %c\n", this, size, ch);
1591 if(size <= this->size)
1592 basic_string_char_erase(this, size, this->size);
1594 basic_string_char_append_len_ch(this, size-this->size, ch);
1597 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z */
1598 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z */
1599 DEFINE_THISCALL_WRAPPER(basic_string_char_resize, 8)
1600 void __thiscall basic_string_char_resize(
1601 basic_string_char *this, MSVCP_size_t size)
1603 basic_string_char_resize_ch(this, size, '\0');
1606 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADXZ */
1607 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADXZ */
1608 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1609 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1610 DEFINE_THISCALL_WRAPPER(basic_string_char_begin, 4)
1611 char* __thiscall basic_string_char_begin(basic_string_char *this)
1613 TRACE("(%p)\n", this);
1614 basic_string_char__Freeze(this);
1618 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADXZ */
1619 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADXZ */
1620 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1621 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1622 DEFINE_THISCALL_WRAPPER(basic_string_char_end, 4)
1623 char* __thiscall basic_string_char_end(basic_string_char *this)
1625 TRACE("(%p)\n", this);
1626 basic_string_char__Freeze(this);
1627 return this->ptr+this->size;
1630 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@PADDAADPADH@2@XZ */
1631 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@PEADDAEADPEAD_J@2@XZ */
1632 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@PBDDABDPBDH@2@XZ */
1633 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@PEBDDAEBDPEBD_J@2@XZ */
1634 DEFINE_THISCALL_WRAPPER(basic_string_char_rbegin, 8)
1635 String_reverse_iterator_char* __thiscall basic_string_char_rbegin(
1636 basic_string_char *this, String_reverse_iterator_char *ret)
1638 TRACE("(%p %p)\n", this, ret);
1639 ret->ptr = basic_string_char_end(this);
1643 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@PADDAADPADH@2@XZ */
1644 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@PEADDAEADPEAD_J@2@XZ */
1645 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@PBDDABDPBDH@2@XZ */
1646 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@PEBDDAEBDPEBD_J@2@XZ */
1647 DEFINE_THISCALL_WRAPPER(basic_string_char_rend, 8)
1648 String_reverse_iterator_char* __thiscall basic_string_char_rend(
1649 basic_string_char *this, String_reverse_iterator_char *ret)
1651 TRACE("(%p %p)\n", this, ret);
1652 ret->ptr = basic_string_char_begin(this);
1656 /* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1657 /* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1658 /* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1659 /* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1660 DEFINE_THISCALL_WRAPPER(basic_string_char_c_str, 4)
1661 const char* __thiscall basic_string_char_c_str(const basic_string_char *this)
1663 TRACE("%p\n", this);
1667 /* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1668 /* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1669 /* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1670 /* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1671 DEFINE_THISCALL_WRAPPER(basic_string_char_length, 4)
1672 MSVCP_size_t __thiscall basic_string_char_length(const basic_string_char *this)
1674 TRACE("%p\n", this);
1678 /* ?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1679 /* ?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1680 DEFINE_THISCALL_WRAPPER(basic_string_char_max_size, 4)
1681 MSVCP_size_t __thiscall basic_string_char_max_size(const basic_string_char *this)
1683 TRACE("%p\n", this);
1684 return MSVCP_allocator_char_max_size(NULL)-1;
1687 /* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1688 /* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1689 DEFINE_THISCALL_WRAPPER(basic_string_char_capacity, 4)
1690 MSVCP_size_t __thiscall basic_string_char_capacity(basic_string_char *this)
1692 TRACE("%p\n", this);
1696 /* ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z */
1697 /* ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z */
1698 DEFINE_THISCALL_WRAPPER(basic_string_char_reserve, 8)
1699 void __thiscall basic_string_char_reserve(basic_string_char *this, MSVCP_size_t size)
1703 TRACE("%p %ld\n", this, size);
1709 basic_string_char__Grow(this, size, FALSE);
1710 basic_string_char__Eos(this, len);
1713 /* ?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE_NXZ */
1714 /* ?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_NXZ */
1715 DEFINE_THISCALL_WRAPPER(basic_string_char_empty, 4)
1716 MSVCP_bool __thiscall basic_string_char_empty(basic_string_char *this)
1718 TRACE("%p\n", this);
1719 return this->size == 0;
1722 /* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXAAV12@@Z */
1723 /* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEAV12@@Z */
1724 DEFINE_THISCALL_WRAPPER(basic_string_char_swap, 8)
1725 void __thiscall basic_string_char_swap(basic_string_char *this, basic_string_char *str)
1727 basic_string_char tmp;
1728 TRACE("%p %p\n", this, str);
1735 /* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV12@II@Z */
1736 /* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV12@_K0@Z */
1737 DEFINE_THISCALL_WRAPPER(basic_string_char_substr, 16)
1738 basic_string_char* __thiscall basic_string_char_substr(basic_string_char *this,
1739 basic_string_char *ret, MSVCP_size_t off, MSVCP_size_t len)
1741 TRACE("%p %lu %lu\n", this, off, len);
1743 basic_string_char_ctor_substr_alloc(ret, this, off, len, NULL);
1747 /* ?copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPADII@Z */
1748 /* ?copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEAD_K1@Z */
1749 DEFINE_THISCALL_WRAPPER(basic_string_char_copy, 16)
1750 MSVCP_size_t __thiscall basic_string_char_copy(const basic_string_char *this,
1751 char *dest, MSVCP_size_t count, MSVCP_size_t off)
1753 TRACE("%p %p %lu %lu\n", this, dest, count, off);
1755 if(off > this->size)
1757 if(count > this->size-off)
1758 count = this->size-off;
1759 char_traits_char__Copy_s(dest, count, this->ptr+off, count);
1763 /* ?get_allocator@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$allocator@D@2@XZ */
1764 /* ?get_allocator@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$allocator@D@2@XZ */
1765 DEFINE_THISCALL_WRAPPER(basic_string_char_get_allocator, 8)
1766 allocator* __thiscall basic_string_char_get_allocator(const basic_string_char *this, allocator *ret)
1768 TRACE("%p\n", this);
1772 static wchar_t* char_traits_wchar__Move_s(wchar_t *dest,
1773 MSVCP_size_t size, const wchar_t *src, MSVCP_size_t count)
1775 if(!dest || !src || size<count) {
1778 _invalid_parameter(NULL, NULL, NULL, 0, 0);
1782 return memmove(dest, src, count);
1785 static wchar_t* char_traits_wchar__Copy_s(wchar_t *dest,
1786 MSVCP_size_t size, const wchar_t *src, MSVCP_size_t count)
1788 if(!dest || !src || size<count) {
1791 _invalid_parameter(NULL, NULL, NULL, 0, 0);
1795 return memcpy(dest, src, count);
1798 static MSVCP_size_t char_traits_wchar_length(const wchar_t *str)
1800 return wcslen((WCHAR*)str);
1803 static wchar_t* char_traits_wchar_assignn(wchar_t *str, MSVCP_size_t num, wchar_t c)
1805 return memset(str, c, num);
1808 static int char_traits_wchar_compare(const wchar_t *s1,
1809 const wchar_t *s2, MSVCP_size_t count)
1811 int ret = memcmp(s1, s2, count);
1812 return (ret>0 ? 1 : (ret<0 ? -1 : 0));
1815 static const wchar_t* char_traits_wchar_find(const wchar_t *str,
1816 MSVCP_size_t range, const wchar_t *c)
1818 return memchr(str, *c, range);
1821 static MSVCP_bool basic_string_wchar_inside(
1822 basic_string_wchar *this, const wchar_t *ptr)
1824 return ptr>=this->ptr && ptr<this->ptr+this->size;
1827 /* ?npos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@2IB */
1828 /* ?npos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@2_KB */
1829 const MSVCP_size_t basic_string_wchar_npos = -1;
1831 /* ?_C@?1??_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGXZ@4GB */
1832 /* ?_C@?1??_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGXZ@4GB */
1833 const wchar_t basic_string_wchar_nullbyte = '\0';
1835 /* ?_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGXZ */
1836 /* ?_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGXZ */
1837 const wchar_t* __cdecl basic_string_wchar__Nullstr(void)
1839 return &basic_string_wchar_nullbyte;
1842 /* ?_Refcnt@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEAAEPBG@Z */
1843 /* ?_Refcnt@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAAEAEPEBG@Z */
1844 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Refcnt, 8)
1845 unsigned short* __thiscall basic_string_wchar__Refcnt(basic_string_wchar *this, const wchar_t *ptr)
1847 TRACE("(%p %p)\n", this, ptr);
1848 return (unsigned short*)ptr-1;
1851 /* ?_Eos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXI@Z */
1852 /* ?_Eos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_K@Z */
1853 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Eos, 8)
1854 void __thiscall basic_string_wchar__Eos(basic_string_wchar *this, MSVCP_size_t len)
1860 void basic_string_wchar_clear(basic_string_wchar *this)
1862 basic_string_wchar__Eos(this, 0);
1865 /* ?_Tidy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEX_N@Z */
1866 /* ?_Tidy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_N@Z */
1867 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Tidy, 8)
1868 void __thiscall basic_string_wchar__Tidy(basic_string_wchar *this, MSVCP_bool built)
1870 TRACE("(%p %d)\n", this, built);
1872 if(!this->ptr || !built);
1873 else if(!this->ptr[-1] || (unsigned short)this->ptr[-1]==FROZEN)
1874 MSVCP_allocator_wchar_deallocate(NULL, this->ptr, this->res+2);
1878 memset(this, 0, sizeof(*this));
1881 /* ?_Grow@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAE_NI_N@Z */
1882 /* ?_Grow@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAA_N_K_N@Z */
1883 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Grow, 12)
1884 MSVCP_bool __thiscall basic_string_wchar__Grow(basic_string_wchar *this, MSVCP_size_t new_size, MSVCP_bool trim)
1888 basic_string_wchar__Tidy(this, TRUE);
1890 basic_string_wchar__Eos(this, 0);
1891 } else if(this->res<new_size || trim ||
1892 (this->ptr && this->ptr[-1] && (unsigned short)this->ptr[-1]!=FROZEN)) {
1893 MSVCP_size_t new_res = new_size, len = this->size;
1896 if(!trim && this->ptr && !this->ptr[-1]) {
1898 if(new_res/3 < this->res/2)
1899 new_res = this->res + this->res/2;
1902 ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_res+2);
1905 ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_size+2);
1908 ERR("Out of memory\n");
1914 char_traits_wchar__Copy_s(ptr+1, new_size, this->ptr, this->size);
1915 basic_string_wchar__Tidy(this, TRUE);
1917 this->res = new_res;
1918 basic_string_wchar__Eos(this, len>new_res ? new_res : len);
1924 /* ?_Split@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXXZ */
1925 /* ?_Split@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAXXZ */
1926 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Split, 4)
1927 void __thiscall basic_string_wchar__Split(basic_string_wchar *this)
1932 TRACE("(%p)\n", this);
1934 if(!this->ptr || !this->ptr[-1] || (unsigned short)this->ptr[-1]==FROZEN)
1939 basic_string_wchar__Tidy(this, TRUE);
1940 if(basic_string_wchar__Grow(this, len, FALSE)) {
1941 char_traits_wchar__Copy_s(this->ptr, this->res, ptr, len);
1942 basic_string_wchar__Eos(this, len);
1946 /* ?_Freeze@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXXZ */
1947 /* ?_Freeze@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAXXZ */
1948 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Freeze, 4)
1949 void __thiscall basic_string_wchar__Freeze(basic_string_wchar *this)
1951 TRACE("(%p)\n", this);
1952 basic_string_wchar__Split(this);
1954 this->ptr[-1] = FROZEN;
1957 /* ?_Copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXI@Z */
1958 /* ?_Copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_K@Z */
1959 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Copy, 8)
1960 void __thiscall basic_string_wchar__Copy(basic_string_wchar *this, MSVCP_size_t copy_len)
1962 TRACE("%p %lu\n", this, copy_len);
1964 if(!basic_string_wchar__Grow(this, copy_len, FALSE))
1966 basic_string_wchar__Eos(this, copy_len);
1969 /* ?_Pdif@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAIPBG0@Z */
1970 /* ?_Pdif@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CA_KPEBG0@Z */
1971 MSVCP_size_t __cdecl basic_string_wchar__Pdif(const wchar_t *i1, const wchar_t *i2)
1973 TRACE("(%p %p)\n", i1, i2);
1974 return !i1 ? 0 : i1-i2;
1977 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPAGPAGI@Z */
1978 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEAGPEAG_K@Z */
1979 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGPBGI@Z */
1980 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGPEBG_K@Z */
1981 wchar_t* __cdecl basic_string_wchar__Psum(wchar_t *iter, MSVCP_size_t add)
1983 TRACE("(%p %lu)\n", iter, add);
1984 return iter ? iter+add : iter;
1987 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@II@Z */
1988 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0@Z */
1989 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase, 12)
1990 basic_string_wchar* __thiscall basic_string_wchar_erase(
1991 basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t len)
1993 TRACE("%p %lu %lu\n", this, pos, len);
1995 if(pos > this->size)
1998 if(len > this->size-pos)
1999 len = this->size-pos;
2002 basic_string_wchar__Split(this);
2003 char_traits_wchar__Move_s(this->ptr+pos, this->res-pos,
2004 this->ptr+pos+len, this->size-pos-len);
2005 basic_string_wchar__Eos(this, this->size-len);
2011 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAG0@Z */
2012 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAG0@Z */
2013 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase_iter, 12)
2014 wchar_t* __thiscall basic_string_wchar_erase_iter(basic_string_wchar *this, wchar_t *beg, wchar_t *end)
2016 MSVCP_size_t pos = basic_string_wchar__Pdif(beg, this->ptr);
2017 basic_string_wchar_erase(this, pos, basic_string_wchar__Pdif(end, beg));
2018 return basic_string_wchar__Psum(this->ptr, pos);
2021 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAG@Z */
2022 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAG@Z */
2023 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase_beg, 8)
2024 wchar_t* __thiscall basic_string_wchar_erase_beg(basic_string_wchar *this, wchar_t *beg)
2026 MSVCP_size_t pos = beg-this->ptr;
2027 basic_string_wchar_erase(this, pos, 1);
2028 return this->ptr+pos;
2031 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@II@Z */
2032 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
2033 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_substr, 16)
2034 basic_string_wchar* __thiscall basic_string_wchar_assign_substr(
2035 basic_string_wchar *this, const basic_string_wchar *assign,
2036 MSVCP_size_t pos, MSVCP_size_t len)
2038 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
2040 if(assign->size < pos)
2043 if(len > assign->size-pos)
2044 len = assign->size-pos;
2046 if(this == assign) {
2047 basic_string_wchar_erase(this, pos+len, basic_string_wchar_npos);
2048 basic_string_wchar_erase(this, 0, pos);
2049 } else if(basic_string_wchar__Grow(this, len, FALSE)) {
2050 char_traits_wchar__Copy_s(this->ptr, this->res,
2051 assign->ptr+pos, len);
2052 basic_string_wchar__Eos(this, len);
2058 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBGI@Z */
2059 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG_K@Z */
2060 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_cstr_len, 12)
2061 basic_string_wchar* __thiscall basic_string_wchar_assign_cstr_len(
2062 basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
2064 TRACE("%p %s %lu\n", this, debugstr_wn(str, len), len);
2066 if(basic_string_wchar_inside(this, str))
2067 return basic_string_wchar_assign_substr(this, this, str-this->ptr, len);
2068 else if(basic_string_wchar__Grow(this, len, FALSE)) {
2069 char_traits_wchar__Copy_s(this->ptr, this->res, str, len);
2070 basic_string_wchar__Eos(this, len);
2076 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@@Z */
2077 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@@Z */
2078 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@ABV01@@Z */
2079 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@AEBV01@@Z */
2080 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign, 8)
2081 basic_string_wchar* __thiscall basic_string_wchar_assign(
2082 basic_string_wchar *this, const basic_string_wchar *assign)
2084 return basic_string_wchar_assign_substr(this, assign,
2085 0, basic_string_wchar_npos);
2088 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG@Z */
2089 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG@Z */
2090 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@PBG@Z */
2091 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@PEBG@Z */
2092 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_cstr, 8)
2093 basic_string_wchar* __thiscall basic_string_wchar_assign_cstr(
2094 basic_string_wchar *this, const wchar_t *str)
2096 return basic_string_wchar_assign_cstr_len(this, str,
2097 char_traits_wchar_length(str));
2100 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@G@Z */
2101 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@G@Z */
2102 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_ch, 8)
2103 basic_string_wchar* __thiscall basic_string_wchar_assign_ch(
2104 basic_string_wchar *this, wchar_t ch)
2106 return basic_string_wchar_assign_cstr_len(this, &ch, 1);
2109 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IG@Z */
2110 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KG@Z */
2111 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assignn, 12)
2112 basic_string_wchar* __thiscall basic_string_wchar_assignn(
2113 basic_string_wchar *this, MSVCP_size_t count, wchar_t ch)
2115 TRACE("%p %ld %c\n", this, count, ch);
2117 basic_string_wchar__Grow(this, count, FALSE);
2118 char_traits_wchar_assignn(this->ptr, count, ch);
2119 basic_string_wchar__Eos(this, count);
2123 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG0@Z */
2124 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG0@Z */
2125 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_ptr_ptr, 12)
2126 basic_string_wchar* __thiscall basic_string_wchar_assign_ptr_ptr(
2127 basic_string_wchar *this, const wchar_t *first, const wchar_t *last)
2129 return basic_string_wchar_assign_cstr_len(this, first, last-first);
2132 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBGIABV?$allocator@G@1@@Z */
2133 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG_KAEBV?$allocator@G@1@@Z */
2134 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_cstr_len_alloc, 16)
2135 basic_string_wchar* __thiscall basic_string_wchar_ctor_cstr_len_alloc(
2136 basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len, const void *alloc)
2138 TRACE("%p %s %ld\n", this, debugstr_wn(str, len), len);
2140 basic_string_wchar__Tidy(this, FALSE);
2141 basic_string_wchar_assign_cstr_len(this, str, len);
2145 basic_string_wchar* basic_string_wchar_ctor_cstr_len(basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
2147 return basic_string_wchar_ctor_cstr_len_alloc(this, str, len, NULL);
2150 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV01@IIABV?$allocator@G@1@@Z */
2151 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV01@_K1AEBV?$allocator@G@1@@Z */
2152 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_substr_alloc, 20)
2153 basic_string_wchar* __thiscall basic_string_wchar_ctor_substr_alloc(
2154 basic_string_wchar *this, const basic_string_wchar *assign,
2155 MSVCP_size_t pos, MSVCP_size_t len, const void *alloc)
2157 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
2159 basic_string_wchar__Tidy(this, FALSE);
2160 basic_string_wchar_assign_substr(this, assign, pos, len);
2164 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBGABV?$allocator@G@1@@Z */
2165 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBGAEBV?$allocator@G@1@@Z */
2166 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_cstr_alloc, 12)
2167 basic_string_wchar* __thiscall basic_string_wchar_ctor_cstr_alloc(
2168 basic_string_wchar *this, const wchar_t *str, const void *alloc)
2170 TRACE("%p %s\n", this, debugstr_w(str));
2172 basic_string_wchar__Tidy(this, FALSE);
2173 basic_string_wchar_assign_cstr(this, str);
2177 basic_string_wchar* basic_string_wchar_ctor_cstr(basic_string_wchar *this, const wchar_t *str)
2179 return basic_string_wchar_ctor_cstr_alloc(this, str, NULL);
2182 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@IGABV?$allocator@G@1@@Z */
2183 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@_KGAEBV?$allocator@G@1@@Z */
2184 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_ch_alloc, 16)
2185 basic_string_wchar* __thiscall basic_string_wchar_ctor_ch_alloc(basic_string_wchar *this,
2186 MSVCP_size_t count, wchar_t ch, const void *alloc)
2188 TRACE("%p %ld %c\n", this, count, ch);
2190 basic_string_wchar__Tidy(this, FALSE);
2191 basic_string_wchar_assignn(this, count, ch);
2195 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBG0ABV?$allocator@G@1@@Z */
2196 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG0AEBV?$allocator@G@1@@Z */
2197 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_iter, 16)
2198 basic_string_wchar* __thiscall basic_string_wchar_ctor_iter(basic_string_wchar *this,
2199 const wchar_t *first, const wchar_t *last, allocator *alloc)
2201 TRACE("(%p %p %p %p)\n", this, first, last, alloc);
2203 basic_string_wchar__Tidy(this, FALSE);
2204 basic_string_wchar_assign_cstr_len(this, first, basic_string_wchar__Pdif(last, first));
2208 /* ??_F?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
2209 /* ??_F?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
2210 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor, 4)
2211 basic_string_wchar* __thiscall basic_string_wchar_ctor(basic_string_wchar *this)
2213 TRACE("%p\n", this);
2215 basic_string_wchar__Tidy(this, FALSE);
2219 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$allocator@G@1@@Z */
2220 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV?$allocator@G@1@@Z */
2221 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_alloc, 8)
2222 basic_string_wchar* __thiscall basic_string_wchar_ctor_alloc(
2223 basic_string_wchar *this, const void *alloc)
2225 TRACE("%p %p\n", this, alloc);
2227 basic_string_wchar__Tidy(this, FALSE);
2231 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV01@@Z */
2232 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV01@@Z */
2233 DEFINE_THISCALL_WRAPPER(basic_string_wchar_copy_ctor, 8)
2234 basic_string_wchar* __thiscall basic_string_wchar_copy_ctor(
2235 basic_string_wchar *this, const basic_string_wchar *copy)
2237 TRACE("%p %p\n", this, copy);
2239 basic_string_wchar__Tidy(this, FALSE);
2240 basic_string_wchar_assign(this, copy);
2244 /* ??1?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@XZ */
2245 /* ??1?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@XZ */
2246 DEFINE_THISCALL_WRAPPER(basic_string_wchar_dtor, 4)
2247 void __thiscall basic_string_wchar_dtor(basic_string_wchar *this)
2249 TRACE("%p\n", this);
2250 basic_string_wchar__Tidy(this, TRUE);
2253 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIPBGI@Z */
2254 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0PEBG0@Z */
2255 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr_cstr_len, 20)
2256 int __thiscall basic_string_wchar_compare_substr_cstr_len(
2257 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2258 const wchar_t *str, MSVCP_size_t count)
2262 TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_wn(str, count), count);
2264 if(this->size < pos)
2267 if(num > this->size-pos)
2268 num = this->size-pos;
2270 ans = char_traits_wchar_compare(this->ptr+pos,
2271 str, num>count ? count : num);
2277 else if(num < count)
2282 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHPBG@Z */
2283 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAHPEBG@Z */
2284 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_cstr, 8)
2285 int __thiscall basic_string_wchar_compare_cstr(
2286 const basic_string_wchar *this, const wchar_t *str)
2288 return basic_string_wchar_compare_substr_cstr_len(this, 0, this->size,
2289 str, char_traits_wchar_length(str));
2292 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIABV12@II@Z */
2293 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0AEBV12@00@Z */
2294 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr_substr, 24)
2295 int __thiscall basic_string_wchar_compare_substr_substr(
2296 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2297 const basic_string_wchar *compare, MSVCP_size_t off, MSVCP_size_t count)
2299 TRACE("%p %lu %lu %p %lu %lu\n", this, pos, num, compare, off, count);
2301 if(compare->size < off)
2304 if(count > compare->size-off)
2305 count = compare->size-off;
2307 return basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2308 compare->ptr+off, count);
2311 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIABV12@@Z */
2312 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0AEBV12@@Z */
2313 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr, 16)
2314 int __thiscall basic_string_wchar_compare_substr(
2315 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2316 const basic_string_wchar *compare)
2318 return basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2319 compare->ptr, compare->size);
2322 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHABV12@@Z */
2323 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAHAEBV12@@Z */
2324 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare, 8)
2325 int __thiscall basic_string_wchar_compare(
2326 const basic_string_wchar *this, const basic_string_wchar *compare)
2328 return basic_string_wchar_compare_substr_cstr_len(this, 0, this->size,
2329 compare->ptr, compare->size);
2332 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIPBG@Z */
2333 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0PEBG@Z */
2334 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr_cstr, 16)
2335 int __thiscall basic_string_wchar_compare_substr_cstr(const basic_string_wchar *this,
2336 MSVCP_size_t pos, MSVCP_size_t num, const wchar_t *str)
2338 return basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2339 str, char_traits_wchar_length(str));
2342 /* ??$?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 */
2343 /* ??$?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 */
2344 /* ??8std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2345 /* ??8std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2346 MSVCP_bool __cdecl basic_string_wchar_equal(
2347 const basic_string_wchar *left, const basic_string_wchar *right)
2349 return basic_string_wchar_compare(left, right) == 0;
2352 /* ??$?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 */
2353 /* ??$?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 */
2354 /* ??8std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2355 /* ??8std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2356 MSVCP_bool __cdecl basic_string_wchar_equal_str_cstr(
2357 const basic_string_wchar *left, const wchar_t *right)
2359 return basic_string_wchar_compare_cstr(left, right) == 0;
2362 /* ??$?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 */
2363 /* ??$?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 */
2364 /* ??8std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2365 /* ??8std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2366 MSVCP_bool __cdecl basic_string_wchar_equal_cstr_str(
2367 const wchar_t *left, const basic_string_wchar *right)
2369 return basic_string_wchar_compare_cstr(right, left) == 0;
2372 /* ??$?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 */
2373 /* ??$?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 */
2374 /* ??9std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2375 /* ??9std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2376 MSVCP_bool __cdecl basic_string_wchar_not_equal(
2377 const basic_string_wchar *left, const basic_string_wchar *right)
2379 return basic_string_wchar_compare(left, right) != 0;
2382 /* ??$?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 */
2383 /* ??$?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 */
2384 /* ??9std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2385 /* ??9std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2386 MSVCP_bool __cdecl basic_string_wchar_not_equal_str_cstr(
2387 const basic_string_wchar *left, const wchar_t *right)
2389 return basic_string_wchar_compare_cstr(left, right) != 0;
2392 /* ??$?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 */
2393 /* ??$?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 */
2394 /* ??9std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2395 /* ??9std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2396 MSVCP_bool __cdecl basic_string_wchar_not_equal_cstr_str(
2397 const wchar_t *left, const basic_string_wchar *right)
2399 return basic_string_wchar_compare_cstr(right, left) != 0;
2402 /* ??$?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 */
2403 /* ??$?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 */
2404 /* ??Mstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2405 /* ??Mstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2406 MSVCP_bool __cdecl basic_string_wchar_lower(
2407 const basic_string_wchar *left, const basic_string_wchar *right)
2409 return basic_string_wchar_compare(left, right) < 0;
2412 /* ??$?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 */
2413 /* ??$?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 */
2414 /* ??Mstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2415 /* ??Mstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2416 MSVCP_bool __cdecl basic_string_wchar_lower_bstr_cstr(
2417 const basic_string_wchar *left, const wchar_t *right)
2419 return basic_string_wchar_compare_cstr(left, right) < 0;
2422 /* ??$?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 */
2423 /* ??$?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 */
2424 /* ??Mstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2425 /* ??Mstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2426 MSVCP_bool __cdecl basic_string_wchar_lower_cstr_bstr(
2427 const wchar_t *left, const basic_string_wchar *right)
2429 return basic_string_wchar_compare_cstr(right, left) > 0;
2432 /* ??$?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 */
2433 /* ??$?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 */
2434 /* ??Nstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2435 /* ??Nstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2436 MSVCP_bool __cdecl basic_string_wchar_leq(
2437 const basic_string_wchar *left, const basic_string_wchar *right)
2439 return basic_string_wchar_compare(left, right) <= 0;
2442 /* ??$?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 */
2443 /* ??$?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 */
2444 /* ??Nstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2445 /* ??Nstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2446 MSVCP_bool __cdecl basic_string_wchar_leq_bstr_cstr(
2447 const basic_string_wchar *left, const wchar_t *right)
2449 return basic_string_wchar_compare_cstr(left, right) <= 0;
2452 /* ??$?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 */
2453 /* ??$?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 */
2454 /* ??Nstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2455 /* ??Nstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2456 MSVCP_bool __cdecl basic_string_wchar_leq_cstr_bstr(
2457 const wchar_t *left, const basic_string_wchar *right)
2459 return basic_string_wchar_compare_cstr(right, left) >= 0;
2462 /* ??$?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 */
2463 /* ??$?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 */
2464 /* ??Ostd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2465 /* ??Ostd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2466 MSVCP_bool __cdecl basic_string_wchar_greater(
2467 const basic_string_wchar *left, const basic_string_wchar *right)
2469 return basic_string_wchar_compare(left, right) > 0;
2472 /* ??$?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 */
2473 /* ??$?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 */
2474 /* ??Ostd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2475 /* ??Ostd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2476 MSVCP_bool __cdecl basic_string_wchar_greater_bstr_cstr(
2477 const basic_string_wchar *left, const wchar_t *right)
2479 return basic_string_wchar_compare_cstr(left, right) > 0;
2482 /* ??$?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 */
2483 /* ??$?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 */
2484 /* ??Ostd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2485 /* ??Ostd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2486 MSVCP_bool __cdecl basic_string_wchar_greater_cstr_bstr(
2487 const wchar_t *left, const basic_string_wchar *right)
2489 return basic_string_wchar_compare_cstr(right, left) < 0;
2492 /* ??$?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 */
2493 /* ??$?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 */
2494 /* ??Pstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2495 /* ??Pstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2496 MSVCP_bool __cdecl basic_string_wchar_geq(
2497 const basic_string_wchar *left, const basic_string_wchar *right)
2499 return basic_string_wchar_compare(left, right) >= 0;
2502 /* ??$?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 */
2503 /* ??$?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 */
2504 /* ??Pstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2505 /* ??Pstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2506 MSVCP_bool __cdecl basic_string_wchar_geq_bstr_cstr(
2507 const basic_string_wchar *left, const wchar_t *right)
2509 return basic_string_wchar_compare_cstr(left, right) >= 0;
2512 /* ??$?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 */
2513 /* ??$?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 */
2514 /* ??Pstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2515 /* ??Pstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2516 MSVCP_bool __cdecl basic_string_wchar_geq_cstr_bstr(
2517 const wchar_t *left, const basic_string_wchar *right)
2519 return basic_string_wchar_compare_cstr(right, left) <= 0;
2522 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2523 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2524 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_cstr_substr, 16)
2525 MSVCP_size_t __thiscall basic_string_wchar_find_cstr_substr(
2526 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos, MSVCP_size_t len)
2528 const wchar_t *p, *end;
2530 TRACE("%p %s %lu %lu\n", this, debugstr_wn(find, len), pos, len);
2532 if(len==0 && pos<=this->size)
2535 end = this->ptr+this->size-len+1;
2536 for(p=this->ptr+pos; p<end; p++) {
2537 p = char_traits_wchar_find(p, end-p, find);
2541 if(!char_traits_wchar_compare(p, find, len))
2545 return basic_string_wchar_npos;
2548 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2549 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2550 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_off, 12)
2551 MSVCP_size_t __thiscall basic_string_wchar_find_off(
2552 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2554 return basic_string_wchar_find_cstr_substr(this, find->ptr, off, find->size);
2557 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2558 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2559 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_ch, 12)
2560 MSVCP_size_t __thiscall basic_string_wchar_find_ch(
2561 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t pos)
2563 return basic_string_wchar_find_cstr_substr(this, &ch, pos, 1);
2566 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2567 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2568 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_cstr_off, 12)
2569 MSVCP_size_t __thiscall basic_string_wchar_find_cstr_off(
2570 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos)
2572 return basic_string_wchar_find_cstr_substr(this, find, pos,
2573 char_traits_wchar_length(find));
2576 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2577 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2578 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_cstr_substr, 16)
2579 MSVCP_size_t __thiscall basic_string_wchar_rfind_cstr_substr(
2580 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos, MSVCP_size_t len)
2582 const wchar_t *p, *end;
2584 TRACE("%p %s %lu %lu\n", this, debugstr_wn(find, len), pos, len);
2587 return pos<this->size ? pos : this->size;
2589 if(len > this->size)
2590 return basic_string_wchar_npos;
2592 if(pos > this->size-len+1)
2593 pos = this->size-len+1;
2595 for(p=end+pos-1; p>=end; p--) {
2596 if(*p==*find && !char_traits_wchar_compare(p, find, len))
2600 return basic_string_wchar_npos;
2603 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2604 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2605 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_off, 12)
2606 MSVCP_size_t __thiscall basic_string_wchar_rfind_off(
2607 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2609 return basic_string_wchar_rfind_cstr_substr(this, find->ptr, off, find->size);
2612 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2613 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2614 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_ch, 12)
2615 MSVCP_size_t __thiscall basic_string_wchar_rfind_ch(
2616 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t pos)
2618 return basic_string_wchar_rfind_cstr_substr(this, &ch, pos, 1);
2621 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2622 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2623 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_cstr_off, 12)
2624 MSVCP_size_t __thiscall basic_string_wchar_rfind_cstr_off(
2625 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos)
2627 return basic_string_wchar_rfind_cstr_substr(this, find, pos,
2628 char_traits_wchar_length(find));
2631 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2632 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2633 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of_cstr_substr, 16)
2634 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of_cstr_substr(
2635 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2637 const wchar_t *p, *end;
2639 TRACE("%p %p %lu %lu\n", this, find, off, len);
2641 if(off<this->size) {
2642 end = this->ptr+this->size;
2643 for(p=this->ptr+off; p<end; p++)
2644 if(!char_traits_wchar_find(find, len, p))
2648 return basic_string_wchar_npos;
2651 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2652 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2653 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of, 12)
2654 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of(
2655 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2657 return basic_string_wchar_find_first_not_of_cstr_substr(this,
2658 find->ptr, off, find->size);
2661 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2662 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2663 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of_ch, 12)
2664 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of_ch(
2665 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2667 return basic_string_wchar_find_first_not_of_cstr_substr(this, &ch, off, 1);
2670 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2671 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2672 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of_cstr, 12)
2673 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of_cstr(
2674 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2676 return basic_string_wchar_find_first_not_of_cstr_substr(
2677 this, find, off, char_traits_wchar_length(find));
2680 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2681 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2682 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of_cstr_substr, 16)
2683 MSVCP_size_t __thiscall basic_string_wchar_find_first_of_cstr_substr(
2684 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2686 const wchar_t *p, *end;
2688 TRACE("%p %p %lu %lu\n", this, find, off, len);
2690 if(len>0 && off<this->size) {
2691 end = this->ptr+this->size;
2692 for(p=this->ptr+off; p<end; p++)
2693 if(char_traits_wchar_find(find, len, p))
2697 return basic_string_wchar_npos;
2700 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2701 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2702 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of, 12)
2703 MSVCP_size_t __thiscall basic_string_wchar_find_first_of(
2704 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2706 return basic_string_wchar_find_first_of_cstr_substr(this,
2707 find->ptr, off, find->size);
2710 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2711 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2712 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of_ch, 12)
2713 MSVCP_size_t __thiscall basic_string_wchar_find_first_of_ch(
2714 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2716 return basic_string_wchar_find_first_of_cstr_substr(this, &ch, off, 1);
2719 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2720 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2721 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of_cstr, 12)
2722 MSVCP_size_t __thiscall basic_string_wchar_find_first_of_cstr(
2723 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2725 return basic_string_wchar_find_first_of_cstr_substr(
2726 this, find, off, char_traits_wchar_length(find));
2729 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2730 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2731 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of_cstr_substr, 16)
2732 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of_cstr_substr(
2733 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2735 const wchar_t *p, *beg;
2737 TRACE("%p %p %lu %lu\n", this, find, off, len);
2739 if(len>0 && this->size>0) {
2740 if(off >= this->size)
2744 for(p=beg+off; p>=beg; p--)
2745 if(!char_traits_wchar_find(find, len, p))
2749 return basic_string_wchar_npos;
2752 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2753 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2754 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of, 12)
2755 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of(
2756 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2758 return basic_string_wchar_find_last_not_of_cstr_substr(this,
2759 find->ptr, off, find->size);
2762 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2763 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2764 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of_ch, 12)
2765 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of_ch(
2766 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2768 return basic_string_wchar_find_last_not_of_cstr_substr(this, &ch, off, 1);
2771 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2772 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2773 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of_cstr, 12)
2774 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of_cstr(
2775 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2777 return basic_string_wchar_find_last_not_of_cstr_substr(
2778 this, find, off, char_traits_wchar_length(find));
2781 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2782 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2783 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of_cstr_substr, 16)
2784 MSVCP_size_t __thiscall basic_string_wchar_find_last_of_cstr_substr(
2785 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2787 const wchar_t *p, *beg;
2789 TRACE("%p %p %lu %lu\n", this, find, off, len);
2791 if(len>0 && this->size>0) {
2792 if(off >= this->size)
2796 for(p=beg+off; p>=beg; p--)
2797 if(char_traits_wchar_find(find, len, p))
2801 return basic_string_wchar_npos;
2804 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2805 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2806 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of, 12)
2807 MSVCP_size_t __thiscall basic_string_wchar_find_last_of(
2808 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2810 return basic_string_wchar_find_last_of_cstr_substr(this,
2811 find->ptr, off, find->size);
2814 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2815 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2816 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of_ch, 12)
2817 MSVCP_size_t __thiscall basic_string_wchar_find_last_of_ch(
2818 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2820 return basic_string_wchar_find_last_of_cstr_substr(this, &ch, off, 1);
2823 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2824 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2825 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of_cstr, 12)
2826 MSVCP_size_t __thiscall basic_string_wchar_find_last_of_cstr(
2827 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2829 return basic_string_wchar_find_last_of_cstr_substr(
2830 this, find, off, char_traits_wchar_length(find));
2833 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@II@Z */
2834 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
2835 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_substr, 16)
2836 basic_string_wchar* __thiscall basic_string_wchar_append_substr(basic_string_wchar *this,
2837 const basic_string_wchar *append, MSVCP_size_t offset, MSVCP_size_t count)
2839 TRACE("%p %p %lu %lu\n", this, append, offset, count);
2841 if(append->size < offset)
2844 if(count > append->size-offset)
2845 count = append->size-offset;
2847 if(basic_string_wchar_npos-this->size<=count || this->size+count<this->size)
2850 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2851 char_traits_wchar__Copy_s(this->ptr+this->size,
2852 this->res-this->size, append->ptr+offset, count);
2853 basic_string_wchar__Eos(this, this->size+count);
2859 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBGI@Z */
2860 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG_K@Z */
2861 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_cstr_len, 12)
2862 basic_string_wchar* __thiscall basic_string_wchar_append_cstr_len(
2863 basic_string_wchar *this, const wchar_t *append, MSVCP_size_t count)
2865 TRACE("%p %s %lu\n", this, debugstr_wn(append, count), count);
2867 if(basic_string_wchar_inside(this, append))
2868 return basic_string_wchar_append_substr(this, this, append-this->ptr, count);
2870 if(basic_string_wchar_npos-this->size<=count || this->size+count<this->size)
2873 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2874 char_traits_wchar__Copy_s(this->ptr+this->size,
2875 this->res-this->size, append, count);
2876 basic_string_wchar__Eos(this, this->size+count);
2882 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IG@Z */
2883 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KG@Z */
2884 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_len_ch, 12)
2885 basic_string_wchar* __thiscall basic_string_wchar_append_len_ch(
2886 basic_string_wchar *this, MSVCP_size_t count, wchar_t ch)
2888 TRACE("%p %lu %c\n", this, count, ch);
2890 if(basic_string_wchar_npos-this->size <= count)
2893 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2894 char_traits_wchar_assignn(this->ptr+this->size, count, ch);
2895 basic_string_wchar__Eos(this, this->size+count);
2901 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@@Z */
2902 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@@Z */
2903 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@ABV01@@Z */
2904 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@AEBV01@@Z */
2905 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append, 8)
2906 basic_string_wchar* __thiscall basic_string_wchar_append(
2907 basic_string_wchar *this, const basic_string_wchar *append)
2909 return basic_string_wchar_append_substr(this, append,
2910 0, basic_string_wchar_npos);
2913 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@G@Z */
2914 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@G@Z */
2915 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_ch, 8)
2916 basic_string_wchar* __thiscall basic_string_wchar_append_ch(
2917 basic_string_wchar *this, wchar_t ch)
2919 return basic_string_wchar_append_len_ch(this, 1, ch);
2922 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG0@Z */
2923 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG0@Z */
2924 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_beg_end, 12)
2925 basic_string_wchar* __thiscall basic_string_wchar_append_beg_end(
2926 basic_string_wchar *this, const wchar_t *beg, const wchar_t *end)
2928 return basic_string_wchar_append_cstr_len(this, beg, end-beg);
2931 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG@Z */
2932 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG@Z */
2933 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@PBG@Z */
2934 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@PEBG@Z */
2935 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_cstr, 8)
2936 basic_string_wchar* __thiscall basic_string_wchar_append_cstr(
2937 basic_string_wchar *this, const wchar_t *append)
2939 return basic_string_wchar_append_cstr_len(this, append,
2940 char_traits_wchar_length(append));
2942 /* ??$?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 */
2943 /* ??$?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 */
2944 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@0@Z */
2945 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@0@Z */
2946 basic_string_wchar* __cdecl basic_string_wchar_concatenate(basic_string_wchar *ret,
2947 const basic_string_wchar *left, const basic_string_wchar *right)
2949 TRACE("%p %p\n", left, right);
2951 basic_string_wchar_copy_ctor(ret, left);
2952 basic_string_wchar_append(ret, right);
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@ABV10@G@Z */
2957 /* ??$?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 */
2958 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@G@Z */
2959 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@G@Z */
2960 basic_string_wchar* __cdecl basic_string_wchar_concatenate_bstr_ch(basic_string_wchar *ret,
2961 const basic_string_wchar *left, wchar_t right)
2963 TRACE("%p %c\n", left, right);
2965 basic_string_wchar_copy_ctor(ret, left);
2966 basic_string_wchar_append_ch(ret, right);
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@ABV10@PBG@Z */
2971 /* ??$?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 */
2972 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@PBG@Z */
2973 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@PEBG@Z */
2974 basic_string_wchar* __cdecl basic_string_wchar_concatenate_bstr_cstr(basic_string_wchar *ret,
2975 const basic_string_wchar *left, const wchar_t *right)
2977 TRACE("%p %s\n", left, debugstr_w(right));
2979 basic_string_wchar_copy_ctor(ret, left);
2980 basic_string_wchar_append_cstr(ret, right);
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@GABV10@@Z */
2985 /* ??$?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 */
2986 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GABV10@@Z */
2987 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GAEBV10@@Z */
2988 basic_string_wchar* __cdecl basic_string_wchar_concatenate_ch_bstr(basic_string_wchar *ret,
2989 wchar_t left, const basic_string_wchar *right)
2991 TRACE("%c %p\n", left, right);
2993 basic_string_wchar_ctor_cstr_len_alloc(ret, &left, 1, NULL);
2994 basic_string_wchar_append(ret, right);
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@PBGABV10@@Z */
2999 /* ??$?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 */
3000 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBGABV10@@Z */
3001 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBGAEBV10@@Z */
3002 basic_string_wchar* __cdecl basic_string_wchar_concatenate_cstr_bstr(basic_string_wchar *ret,
3003 const wchar_t *left, const basic_string_wchar *right)
3005 TRACE("%s %p\n", debugstr_w(left), right);
3007 basic_string_wchar_ctor_cstr_alloc(ret, left, NULL);
3008 basic_string_wchar_append(ret, right);
3012 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGI@Z */
3013 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAG_K@Z */
3014 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEABGI@Z */
3015 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAAEBG_K@Z */
3016 DEFINE_THISCALL_WRAPPER(basic_string_wchar_operator_at, 8)
3017 wchar_t* __thiscall basic_string_wchar_operator_at(
3018 basic_string_wchar *this, MSVCP_size_t pos)
3020 TRACE("%p %lu\n", this, pos);
3022 assert(this->size >= pos);
3023 return this->ptr+pos;
3026 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGI@Z */
3027 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAG_K@Z */
3028 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEABGI@Z */
3029 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAAEBG_K@Z */
3030 DEFINE_THISCALL_WRAPPER(basic_string_wchar_at, 8)
3031 wchar_t* __thiscall basic_string_wchar_at(
3032 basic_string_wchar *this, MSVCP_size_t pos)
3034 TRACE("%p %lu\n", this, pos);
3036 if(this->size <= pos)
3039 return this->ptr+pos;
3042 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIPBGI@Z */
3043 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG0@Z */
3044 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_cstr_len, 20)
3045 basic_string_wchar* __thiscall basic_string_wchar_replace_cstr_len(basic_string_wchar *this,
3046 MSVCP_size_t off, MSVCP_size_t len, const wchar_t *str, MSVCP_size_t str_len)
3048 MSVCP_size_t inside_pos = -1;
3049 wchar_t *ptr = this->ptr;
3051 TRACE("%p %ld %ld %p %ld\n", this, off, len, str, str_len);
3053 if(this->size < off)
3056 if(len > this->size-off)
3057 len = this->size-off;
3059 if(basic_string_wchar_npos-str_len <= this->size-len)
3062 if(basic_string_wchar_inside(this, str))
3063 inside_pos = str-ptr;
3065 if(this->size-len+str_len)
3066 basic_string_wchar__Grow(this, this->size-len+str_len, FALSE);
3069 if(inside_pos == -1) {
3070 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3071 memcpy(ptr+off, str, str_len*sizeof(char));
3072 } else if(len >= str_len) {
3073 memmove(ptr+off, ptr+inside_pos, str_len*sizeof(char));
3074 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3078 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3080 if(inside_pos < off+len) {
3081 size = off+len-inside_pos;
3084 memmove(ptr+off, ptr+inside_pos, size*sizeof(char));
3090 memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(char));
3093 basic_string_wchar__Eos(this, this->size-len+str_len);
3097 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@II@Z */
3098 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0AEBV12@00@Z */
3099 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_substr, 24)
3100 basic_string_wchar* __thiscall basic_string_wchar_replace_substr(basic_string_wchar *this, MSVCP_size_t off,
3101 MSVCP_size_t len, const basic_string_wchar *str, MSVCP_size_t str_off, MSVCP_size_t str_len)
3103 if(str->size < str_off)
3106 if(str_len > str->size-str_off)
3107 str_len = str->size-str_off;
3109 return basic_string_wchar_replace_cstr_len(this, off, len,
3110 str->ptr+str_off, str_len);
3113 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@@Z */
3114 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0AEBV12@@Z */
3115 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace, 16)
3116 basic_string_wchar* __thiscall basic_string_wchar_replace(basic_string_wchar *this,
3117 MSVCP_size_t off, MSVCP_size_t len, const basic_string_wchar *str)
3119 return basic_string_wchar_replace_cstr_len(this, off, len,
3120 str->ptr, str->size);
3123 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIIG@Z */
3124 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K00G@Z */
3125 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_ch, 20)
3126 basic_string_wchar* __thiscall basic_string_wchar_replace_ch(basic_string_wchar *this,
3127 MSVCP_size_t off, MSVCP_size_t len, MSVCP_size_t count, wchar_t ch)
3131 TRACE("%p %ld %ld %ld %c\n", this, off, len, count, ch);
3133 if(this->size < off)
3136 if(len > this->size-off)
3137 len = this->size-off;
3139 if(basic_string_wchar_npos-count <= this->size-len)
3142 if(this->size-len+count)
3143 basic_string_wchar__Grow(this, this->size-len+count, FALSE);
3146 memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(char));
3147 char_traits_wchar_assignn(ptr+off, count, ch);
3148 basic_string_wchar__Eos(this, this->size-len+count);
3153 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIPBG@Z */
3154 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG@Z */
3155 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_cstr, 16)
3156 basic_string_wchar* __thiscall basic_string_wchar_replace_cstr(basic_string_wchar *this,
3157 MSVCP_size_t off, MSVCP_size_t len, const wchar_t *str)
3159 return basic_string_wchar_replace_cstr_len(this, off, len, str,
3160 char_traits_wchar_length(str));
3163 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0ABV12@@Z */
3164 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0AEBV12@@Z */
3165 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_bstr, 16)
3166 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_bstr(basic_string_wchar *this,
3167 wchar_t *beg, wchar_t *end, const basic_string_wchar *str)
3169 return basic_string_wchar_replace(this, basic_string_wchar__Pdif(beg, this->ptr),
3170 basic_string_wchar__Pdif(end, beg), str);
3173 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0IG@Z */
3174 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0_KG@Z */
3175 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_chn, 20)
3176 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_chn(basic_string_wchar *this,
3177 wchar_t *beg, wchar_t *end, MSVCP_size_t count, wchar_t ch)
3179 return basic_string_wchar_replace_ch(this, basic_string_wchar__Pdif(beg, this->ptr),
3180 basic_string_wchar__Pdif(end, beg), count, ch);
3183 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBG1@Z */
3184 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG1@Z */
3185 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_iter, 20)
3186 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_iter(basic_string_wchar *this,
3187 wchar_t *beg1, wchar_t *end1, const wchar_t *beg2, const wchar_t *end2)
3189 return basic_string_wchar_replace_cstr_len(this, basic_string_wchar__Pdif(beg1, this->ptr),
3190 basic_string_wchar__Pdif(end1, beg1), beg2, basic_string_wchar__Pdif(end2, beg2));
3193 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBG@Z */
3194 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG@Z */
3195 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr, 16)
3196 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr(basic_string_wchar *this,
3197 wchar_t *beg, wchar_t *end, const wchar_t *str)
3199 return basic_string_wchar_replace_cstr(this, basic_string_wchar__Pdif(beg, this->ptr),
3200 basic_string_wchar__Pdif(end, beg), str);
3203 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBGI@Z */
3204 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG_K@Z */
3205 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr_len, 20)
3206 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr_len(basic_string_wchar *this,
3207 wchar_t *beg, wchar_t *end, const wchar_t *str, MSVCP_size_t len)
3209 return basic_string_wchar_replace_cstr_len(this, basic_string_wchar__Pdif(beg, this->ptr),
3210 basic_string_wchar__Pdif(end, beg), str, len);
3213 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IABV12@@Z */
3214 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KAEBV12@@Z */
3215 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert, 12)
3216 basic_string_wchar* __thiscall basic_string_wchar_insert(basic_string_wchar *this,
3217 MSVCP_size_t off, const basic_string_wchar *str)
3219 return basic_string_wchar_replace(this, off, 0, str);
3222 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IABV12@II@Z */
3223 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KAEBV12@00@Z */
3224 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_substr, 20)
3225 basic_string_wchar* __thiscall basic_string_wchar_insert_substr(
3226 basic_string_wchar *this, MSVCP_size_t off, const basic_string_wchar *str,
3227 MSVCP_size_t str_off, MSVCP_size_t str_count)
3229 return basic_string_wchar_replace_substr(this, off, 0, str, str_off, str_count);
3232 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IPBG@Z */
3233 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KPEBG@Z */
3234 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_cstr, 12)
3235 basic_string_wchar* __thiscall basic_string_wchar_insert_cstr(
3236 basic_string_wchar *this, MSVCP_size_t off, const wchar_t *str)
3238 return basic_string_wchar_replace_cstr(this, off, 0, str);
3241 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IPBGI@Z */
3242 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KPEBG0@Z */
3243 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_cstr_len, 16)
3244 basic_string_wchar* __thiscall basic_string_wchar_insert_cstr_len(basic_string_wchar *this,
3245 MSVCP_size_t off, const wchar_t *str, MSVCP_size_t str_len)
3247 return basic_string_wchar_replace_cstr_len(this, off, 0, str, str_len);
3250 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIG@Z */
3251 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0G@Z */
3252 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_chn, 16)
3253 basic_string_wchar* __thiscall basic_string_wchar_insert_chn(basic_string_wchar *this,
3254 MSVCP_size_t off, MSVCP_size_t count, wchar_t ch)
3256 return basic_string_wchar_replace_ch(this, off, 0, count, ch);
3259 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAGG@Z */
3260 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAGG@Z */
3261 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter_ch, 12)
3262 wchar_t* __thiscall basic_string_wchar_insert_iter_ch(basic_string_wchar *this, wchar_t *pos, wchar_t ch)
3264 MSVCP_size_t off = basic_string_wchar__Pdif(pos, this->ptr);
3265 basic_string_wchar_insert_chn(this, off, 1, ch);
3266 return basic_string_wchar__Psum(this->ptr, off);
3269 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXPAGIG@Z */
3270 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXPEAG_KG@Z */
3271 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter_chn, 16)
3272 void __thiscall basic_string_wchar_insert_iter_chn(basic_string_wchar *this,
3273 wchar_t *pos, MSVCP_size_t n, wchar_t ch)
3275 basic_string_wchar_insert_chn(this, basic_string_wchar__Pdif(pos, this->ptr), n, ch);
3278 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXPAGPBG1@Z */
3279 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXPEAGPEBG1@Z */
3280 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter, 16)
3281 void __thiscall basic_string_wchar_insert_iter(basic_string_wchar *this,
3282 wchar_t *pos, const wchar_t *beg, const wchar_t *end)
3284 basic_string_wchar_insert_cstr_len(this, basic_string_wchar__Pdif(pos, this->ptr),
3285 beg, basic_string_wchar__Pdif(end, beg));
3288 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXIG@Z */
3289 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_KG@Z */
3290 DEFINE_THISCALL_WRAPPER(basic_string_wchar_resize_ch, 12)
3291 void __thiscall basic_string_wchar_resize_ch(
3292 basic_string_wchar *this, MSVCP_size_t size, wchar_t ch)
3294 TRACE("%p %lu %c\n", this, size, ch);
3296 if(size <= this->size)
3297 basic_string_wchar_erase(this, size, this->size);
3299 basic_string_wchar_append_len_ch(this, size-this->size, ch);
3302 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXI@Z */
3303 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_K@Z */
3304 DEFINE_THISCALL_WRAPPER(basic_string_wchar_resize, 8)
3305 void __thiscall basic_string_wchar_resize(
3306 basic_string_wchar *this, MSVCP_size_t size)
3308 basic_string_wchar_resize_ch(this, size, '\0');
3311 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGXZ */
3312 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGXZ */
3313 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3314 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3315 DEFINE_THISCALL_WRAPPER(basic_string_wchar_begin, 4)
3316 wchar_t* __thiscall basic_string_wchar_begin(basic_string_wchar *this)
3318 TRACE("(%p)\n", this);
3319 basic_string_wchar__Freeze(this);
3323 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGXZ */
3324 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGXZ */
3325 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3326 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3327 DEFINE_THISCALL_WRAPPER(basic_string_wchar_end, 4)
3328 wchar_t* __thiscall basic_string_wchar_end(basic_string_wchar *this)
3330 TRACE("(%p)\n", this);
3331 basic_string_wchar__Freeze(this);
3332 return this->ptr+this->size;
3335 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@PAGGAAGPAGH@2@XZ */
3336 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@PEAGGAEAGPEAG_J@2@XZ */
3337 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@PBGGABGPBGH@2@XZ */
3338 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@PEBGGAEBGPEBG_J@2@XZ */
3339 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rbegin, 8)
3340 String_reverse_iterator_wchar* __thiscall basic_string_wchar_rbegin(
3341 basic_string_wchar *this, String_reverse_iterator_wchar *ret)
3343 TRACE("(%p %p)\n", this, ret);
3344 ret->ptr = basic_string_wchar_end(this);
3348 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@PAGGAAGPAGH@2@XZ */
3349 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@PEAGGAEAGPEAG_J@2@XZ */
3350 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@PBGGABGPBGH@2@XZ */
3351 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@PEBGGAEBGPEBG_J@2@XZ */
3352 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rend, 8)
3353 String_reverse_iterator_wchar* __thiscall basic_string_wchar_rend(
3354 basic_string_wchar *this, String_reverse_iterator_wchar *ret)
3356 TRACE("(%p %p)\n", this, ret);
3357 ret->ptr = basic_string_wchar_begin(this);
3361 /* ?c_str@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3362 /* ?c_str@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3363 /* ?data@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3364 /* ?data@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3365 DEFINE_THISCALL_WRAPPER(basic_string_wchar_c_str, 4)
3366 const wchar_t* __thiscall basic_string_wchar_c_str(const basic_string_wchar *this)
3368 TRACE("%p\n", this);
3372 /* ?size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3373 /* ?size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3374 /* ?length@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3375 /* ?length@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3376 DEFINE_THISCALL_WRAPPER(basic_string_wchar_length, 4)
3377 MSVCP_size_t __thiscall basic_string_wchar_length(const basic_string_wchar *this)
3379 TRACE("%p\n", this);
3383 /* ?max_size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3384 /* ?max_size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3385 DEFINE_THISCALL_WRAPPER(basic_string_wchar_max_size, 4)
3386 MSVCP_size_t __thiscall basic_string_wchar_max_size(const basic_string_wchar *this)
3388 TRACE("%p\n", this);
3389 return MSVCP_allocator_wchar_max_size(NULL)-1;
3392 /* ?capacity@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3393 /* ?capacity@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3394 DEFINE_THISCALL_WRAPPER(basic_string_wchar_capacity, 4)
3395 MSVCP_size_t __thiscall basic_string_wchar_capacity(basic_string_wchar *this)
3397 TRACE("%p\n", this);
3401 /* ?reserve@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXI@Z */
3402 /* ?reserve@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_K@Z */
3403 DEFINE_THISCALL_WRAPPER(basic_string_wchar_reserve, 8)
3404 void __thiscall basic_string_wchar_reserve(basic_string_wchar *this, MSVCP_size_t size)
3408 TRACE("%p %ld\n", this, size);
3414 basic_string_wchar__Grow(this, size, FALSE);
3415 basic_string_wchar__Eos(this, len);
3418 /* ?empty@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE_NXZ */
3419 /* ?empty@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_NXZ */
3420 DEFINE_THISCALL_WRAPPER(basic_string_wchar_empty, 4)
3421 MSVCP_bool __thiscall basic_string_wchar_empty(basic_string_wchar *this)
3423 TRACE("%p\n", this);
3424 return this->size == 0;
3427 /* ?swap@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXAAV12@@Z */
3428 /* ?swap@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXAEAV12@@Z */
3429 DEFINE_THISCALL_WRAPPER(basic_string_wchar_swap, 8)
3430 void __thiscall basic_string_wchar_swap(basic_string_wchar *this, basic_string_wchar *str)
3432 basic_string_wchar tmp;
3433 TRACE("%p %p\n", this, str);
3440 /* ?substr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV12@II@Z */
3441 /* ?substr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV12@_K0@Z */
3442 DEFINE_THISCALL_WRAPPER(basic_string_wchar_substr, 16)
3443 basic_string_wchar* __thiscall basic_string_wchar_substr(basic_string_wchar *this,
3444 basic_string_wchar *ret, MSVCP_size_t off, MSVCP_size_t len)
3446 TRACE("%p %lu %lu\n", this, off, len);
3448 basic_string_wchar_ctor_substr_alloc(ret, this, off, len, NULL);
3452 /* ?copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPAGII@Z */
3453 /* ?copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEAG_K1@Z */
3454 DEFINE_THISCALL_WRAPPER(basic_string_wchar_copy, 16)
3455 MSVCP_size_t __thiscall basic_string_wchar_copy(const basic_string_wchar *this,
3456 wchar_t *dest, MSVCP_size_t count, MSVCP_size_t off)
3458 TRACE("%p %p %lu %lu\n", this, dest, count, off);
3460 if(off > this->size)
3462 if(count > this->size-off)
3463 count = this->size-off;
3464 char_traits_wchar__Copy_s(dest, count, this->ptr+off, count);
3468 /* ?get_allocator@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$allocator@G@2@XZ */
3469 /* ?get_allocator@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$allocator@G@2@XZ */
3470 DEFINE_THISCALL_WRAPPER(basic_string_wchar_get_allocator, 8)
3471 allocator* __thiscall basic_string_wchar_get_allocator(const basic_string_wchar *this, allocator *ret)
3473 TRACE("%p\n", this);