imm32: Move thread data from TLSEntry to an internal list.
[wine.git] / dlls / msvcp60 / string.c
blobf1b2b8e7004a719d60158a541b87939c3edee1d8
1 /*
2 * Copyright 2012 Piotr Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "config.h"
21 #include <stdarg.h>
23 #include "msvcp.h"
24 #include "stdio.h"
25 #include "assert.h"
27 #include "windef.h"
28 #include "winbase.h"
29 #include "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(msvcp);
32 #define FROZEN 255
34 /* _String_iterator<char> and _String_const_iterator<char> class */
35 typedef struct {
36 char *ptr;
37 } String_reverse_iterator_char;
39 typedef struct {
40 wchar_t *ptr;
41 } String_reverse_iterator_wchar;
43 /* allocator class */
44 typedef struct {
45 char empty_struct;
46 } allocator;
48 /* ?_Xran@std@@YAXXZ */
49 void __cdecl _Xran(void)
51 static const char msg[] = "invalid string position";
53 TRACE("\n");
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";
62 TRACE("\n");
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) {
70 if(dest && size)
71 dest[0] = '\0';
72 _invalid_parameter(NULL, NULL, NULL, 0, 0);
73 return dest;
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) {
83 if(dest && size)
84 dest[0] = '\0';
85 _invalid_parameter(NULL, NULL, NULL, 0, 0);
86 return dest;
89 return memcpy(dest, src, count);
92 static MSVCP_size_t char_traits_char_length(const char *str)
94 return strlen(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)
150 this->size = len;
151 this->ptr[len] = 0;
154 void basic_string_char_clear(basic_string_char *this)
156 if(this->ptr)
157 basic_string_char__Eos(this, 0);
160 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEX_N@Z */
161 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAX_N@Z */
162 DEFINE_THISCALL_WRAPPER(basic_string_char__Tidy, 8)
163 void __thiscall basic_string_char__Tidy(basic_string_char *this, MSVCP_bool built)
165 TRACE("(%p %d)\n", this, built);
167 if(!built || !this->ptr);
168 else if(!this->ptr[-1] || (unsigned char)this->ptr[-1]==FROZEN)
169 MSVCP_allocator_char_deallocate(NULL, this->ptr-1, this->res+2);
170 else
171 this->ptr[-1]--;
173 memset(this, 0, sizeof(*this));
176 /* ?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAE_NI_N@Z */
177 /* ?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAA_N_K_N@Z */
178 DEFINE_THISCALL_WRAPPER(basic_string_char__Grow, 12)
179 MSVCP_bool __thiscall basic_string_char__Grow(basic_string_char *this, MSVCP_size_t new_size, MSVCP_bool trim)
181 if(!new_size) {
182 if(trim)
183 basic_string_char__Tidy(this, TRUE);
184 else if(this->ptr)
185 basic_string_char__Eos(this, 0);
186 } else if(this->res<new_size || trim ||
187 (this->ptr && this->ptr[-1] && (unsigned char)this->ptr[-1]!=FROZEN)) {
188 MSVCP_size_t new_res = new_size, len = this->size;
189 char *ptr;
191 if(!trim && this->ptr && !this->ptr[-1]) {
192 new_res |= 0xf;
193 if(new_res/3 < this->res/2)
194 new_res = this->res + this->res/2;
197 ptr = MSVCP_allocator_char_allocate(this->allocator, new_res+2);
198 if(!ptr) {
199 new_res = new_size;
200 ptr = MSVCP_allocator_char_allocate(this->allocator, new_size+2);
202 if(!ptr) {
203 ERR("Out of memory\n");
204 return FALSE;
207 if(len > new_res)
208 len = new_res;
210 *ptr = 0;
211 if(this->ptr)
212 char_traits_char__Copy_s(ptr+1, new_size, this->ptr, len);
213 basic_string_char__Tidy(this, TRUE);
214 this->ptr = ptr+1;
215 this->res = new_res;
216 basic_string_char__Eos(this, len);
219 return new_size>0;
222 /* ?_Split@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXXZ */
223 /* ?_Split@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAXXZ */
224 DEFINE_THISCALL_WRAPPER(basic_string_char__Split, 4)
225 void __thiscall basic_string_char__Split(basic_string_char *this)
227 MSVCP_size_t len;
228 char *ptr;
230 TRACE("(%p)\n", this);
232 if(!this->ptr || !this->ptr[-1] || (unsigned char)this->ptr[-1]==FROZEN)
233 return;
235 ptr = this->ptr;
236 len = this->size;
237 basic_string_char__Tidy(this, TRUE);
238 if(basic_string_char__Grow(this, len, FALSE)) {
239 if(ptr)
240 char_traits_char__Copy_s(this->ptr, this->res, ptr, len);
241 basic_string_char__Eos(this, len);
245 /* ?_Freeze@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXXZ */
246 /* ?_Freeze@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAXXZ */
247 DEFINE_THISCALL_WRAPPER(basic_string_char__Freeze, 4)
248 void __thiscall basic_string_char__Freeze(basic_string_char *this)
250 TRACE("(%p)\n", this);
251 basic_string_char__Split(this);
252 if(this->ptr)
253 this->ptr[-1] = FROZEN;
256 /* ?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXI@Z */
257 /* ?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAX_K@Z */
258 DEFINE_THISCALL_WRAPPER(basic_string_char__Copy, 8)
259 void __thiscall basic_string_char__Copy(basic_string_char *this, MSVCP_size_t copy_len)
261 TRACE("%p %lu\n", this, copy_len);
263 if(!basic_string_char__Grow(this, copy_len, TRUE))
264 return;
267 /* ?_Pdif@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAIPBD0@Z */
268 /* ?_Pdif@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CA_KPEBD0@Z */
269 MSVCP_size_t __cdecl basic_string_char__Pdif(const char *i1, const char *i2)
271 TRACE("(%p %p)\n", i1, i2);
272 return !i1 ? 0 : i1-i2;
275 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPADPADI@Z */
276 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEADPEAD_K@Z */
277 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPBDPBDI@Z */
278 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEBDPEBD_K@Z */
279 char* __cdecl basic_string_char__Psum(char *iter, MSVCP_size_t add)
281 TRACE("(%p %lu)\n", iter, add);
282 return iter ? iter+add : iter;
285 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z */
286 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0@Z */
287 DEFINE_THISCALL_WRAPPER(basic_string_char_erase, 12)
288 basic_string_char* __thiscall basic_string_char_erase(
289 basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t len)
291 TRACE("%p %lu %lu\n", this, pos, len);
293 if(pos > this->size)
294 _Xran();
296 if(len > this->size-pos)
297 len = this->size-pos;
299 if(len) {
300 basic_string_char__Split(this);
301 char_traits_char__Move_s(this->ptr+pos, this->res-pos,
302 this->ptr+pos+len, this->size-pos-len);
303 basic_string_char__Eos(this, this->size-len);
306 return this;
309 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPAD0@Z */
310 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEAD0@Z */
311 DEFINE_THISCALL_WRAPPER(basic_string_char_erase_iter, 12)
312 char* __thiscall basic_string_char_erase_iter(basic_string_char *this, char *beg, char *end)
314 MSVCP_size_t pos = basic_string_char__Pdif(beg, this->ptr);
315 basic_string_char_erase(this, pos, basic_string_char__Pdif(end, beg));
316 return basic_string_char__Psum(this->ptr, pos);
319 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPAD@Z */
320 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEAD@Z */
321 DEFINE_THISCALL_WRAPPER(basic_string_char_erase_beg, 8)
322 char* __thiscall basic_string_char_erase_beg(basic_string_char *this, char *beg)
324 MSVCP_size_t pos = beg-this->ptr;
325 basic_string_char_erase(this, pos, 1);
326 return this->ptr+pos;
329 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */
330 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
331 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_substr, 16)
332 basic_string_char* __thiscall basic_string_char_assign_substr(
333 basic_string_char *this, const basic_string_char *assign,
334 MSVCP_size_t pos, MSVCP_size_t len)
336 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
338 if(assign->size < pos)
339 _Xran();
341 if(len > assign->size-pos)
342 len = assign->size-pos;
344 if(this == assign) {
345 basic_string_char_erase(this, pos+len, basic_string_char_npos);
346 basic_string_char_erase(this, 0, pos);
347 } else if(basic_string_char__Grow(this, len, FALSE)) {
348 if(assign->ptr)
349 char_traits_char__Copy_s(this->ptr, this->res, assign->ptr+pos, len);
350 basic_string_char__Eos(this, len);
353 return this;
356 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z */
357 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z */
358 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_cstr_len, 12)
359 basic_string_char* __thiscall basic_string_char_assign_cstr_len(
360 basic_string_char *this, const char *str, MSVCP_size_t len)
362 TRACE("%p %s %lu\n", this, debugstr_an(str, len), len);
364 if(basic_string_char_inside(this, str))
365 return basic_string_char_assign_substr(this, this, str-this->ptr, len);
366 else if(basic_string_char__Grow(this, len, FALSE)) {
367 char_traits_char__Copy_s(this->ptr, this->res, str, len);
368 basic_string_char__Eos(this, len);
371 return this;
374 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */
375 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */
376 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z */
377 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@AEBV01@@Z */
378 DEFINE_THISCALL_WRAPPER(basic_string_char_assign, 8)
379 basic_string_char* __thiscall basic_string_char_assign(
380 basic_string_char *this, const basic_string_char *assign)
382 return basic_string_char_assign_substr(this, assign,
383 0, basic_string_char_npos);
386 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z */
387 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD@Z */
388 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z */
389 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@PEBD@Z */
390 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_cstr, 8)
391 basic_string_char* __thiscall basic_string_char_assign_cstr(
392 basic_string_char *this, const char *str)
394 return basic_string_char_assign_cstr_len(this, str,
395 char_traits_char_length(str));
398 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@D@Z */
399 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@D@Z */
400 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_ch, 8)
401 basic_string_char* __thiscall basic_string_char_assign_ch(
402 basic_string_char *this, char ch)
404 return basic_string_char_assign_cstr_len(this, &ch, 1);
407 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */
408 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KD@Z */
409 DEFINE_THISCALL_WRAPPER(basic_string_char_assignn, 12)
410 basic_string_char* __thiscall basic_string_char_assignn(
411 basic_string_char *this, MSVCP_size_t count, char ch)
413 TRACE("%p %ld %c\n", this, count, ch);
415 basic_string_char__Grow(this, count, FALSE);
416 char_traits_char_assignn(this->ptr, count, ch);
417 basic_string_char__Eos(this, count);
418 return this;
421 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD0@Z */
422 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD0@Z */
423 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_ptr_ptr, 12)
424 basic_string_char* __thiscall basic_string_char_assign_ptr_ptr(
425 basic_string_char *this, const char *first, const char *last)
427 return basic_string_char_assign_cstr_len(this, first, last-first);
430 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDIABV?$allocator@D@1@@Z */
431 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD_KAEBV?$allocator@D@1@@Z */
432 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_cstr_len_alloc, 16)
433 basic_string_char* __thiscall basic_string_char_ctor_cstr_len_alloc(
434 basic_string_char *this, const char *str, MSVCP_size_t len, const void *alloc)
436 TRACE("%p %s %ld\n", this, debugstr_an(str, len), len);
438 basic_string_char__Tidy(this, FALSE);
439 basic_string_char_assign_cstr_len(this, str, len);
440 return this;
443 basic_string_char* basic_string_char_ctor_cstr_len(basic_string_char *this, const char *str, MSVCP_size_t len)
445 return basic_string_char_ctor_cstr_len_alloc(this, str, len, NULL);
448 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@IIABV?$allocator@D@1@@Z */
449 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@_K1AEBV?$allocator@D@1@@Z */
450 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_substr_alloc, 20)
451 basic_string_char* __thiscall basic_string_char_ctor_substr_alloc(
452 basic_string_char *this, const basic_string_char *assign,
453 MSVCP_size_t pos, MSVCP_size_t len, const void *alloc)
455 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
457 basic_string_char__Tidy(this, FALSE);
458 basic_string_char_assign_substr(this, assign, pos, len);
459 return this;
462 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDABV?$allocator@D@1@@Z */
463 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBDAEBV?$allocator@D@1@@Z */
464 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_cstr_alloc, 12)
465 basic_string_char* __thiscall basic_string_char_ctor_cstr_alloc(
466 basic_string_char *this, const char *str, const void *alloc)
468 TRACE("%p %s\n", this, debugstr_a(str));
470 basic_string_char__Tidy(this, FALSE);
471 basic_string_char_assign_cstr(this, str);
472 return this;
475 basic_string_char* basic_string_char_ctor_cstr(
476 basic_string_char *this, const char *str)
478 return basic_string_char_ctor_cstr_alloc(this, str, NULL);
481 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@IDABV?$allocator@D@1@@Z */
482 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@_KDAEBV?$allocator@D@1@@Z */
483 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_ch_alloc, 16)
484 basic_string_char* __thiscall basic_string_char_ctor_ch_alloc(basic_string_char *this,
485 MSVCP_size_t count, char ch, const void *alloc)
487 TRACE("%p %ld %c\n", this, count, ch);
489 basic_string_char__Tidy(this, FALSE);
490 basic_string_char_assignn(this, count, ch);
491 return this;
494 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD0ABV?$allocator@D@1@@Z */
495 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD0AEBV?$allocator@D@1@@Z */
496 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_iter, 16)
497 basic_string_char* __thiscall basic_string_char_ctor_iter(basic_string_char *this,
498 const char *first, const char *last, allocator *alloc)
500 TRACE("(%p %p %p %p)\n", this, first, last, alloc);
502 basic_string_char__Tidy(this, FALSE);
503 basic_string_char_assign_cstr_len(this, first, basic_string_char__Pdif(last, first));
504 return this;
507 /* ??_F?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
508 /* ??_F?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
509 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor, 4)
510 basic_string_char* __thiscall basic_string_char_ctor(basic_string_char *this)
512 TRACE("%p\n", this);
514 basic_string_char__Tidy(this, FALSE);
515 return this;
518 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$allocator@D@1@@Z */
519 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV?$allocator@D@1@@Z */
520 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_alloc, 8)
521 basic_string_char* __thiscall basic_string_char_ctor_alloc(
522 basic_string_char *this, const void *alloc)
524 TRACE("%p %p\n", this, alloc);
526 basic_string_char__Tidy(this, FALSE);
527 return this;
530 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z */
531 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@@Z */
532 DEFINE_THISCALL_WRAPPER(basic_string_char_copy_ctor, 8)
533 basic_string_char* __thiscall basic_string_char_copy_ctor(
534 basic_string_char *this, const basic_string_char *copy)
536 TRACE("%p %p\n", this, copy);
538 basic_string_char__Tidy(this, FALSE);
539 basic_string_char_assign(this, copy);
540 return this;
543 /* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ */
544 /* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@XZ */
545 DEFINE_THISCALL_WRAPPER(basic_string_char_dtor, 4)
546 void __thiscall basic_string_char_dtor(basic_string_char *this)
548 TRACE("%p\n", this);
549 basic_string_char__Tidy(this, TRUE);
552 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIPBDI@Z */
553 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0PEBD0@Z */
554 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_substr_cstr_len, 20)
555 int __thiscall basic_string_char_compare_substr_cstr_len(
556 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
557 const char *str, MSVCP_size_t count)
559 int ans;
561 TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_an(str, count), count);
563 if(this->size < pos)
564 _Xran();
566 if(num > this->size-pos)
567 num = this->size-pos;
569 ans = char_traits_char_compare(this->ptr+pos,
570 str, num>count ? count : num);
571 if(ans)
572 return ans;
574 if(num > count)
575 ans = 1;
576 else if(num < count)
577 ans = -1;
578 return ans;
581 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHPBD@Z */
582 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAHPEBD@Z */
583 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_cstr, 8)
584 int __thiscall basic_string_char_compare_cstr(
585 const basic_string_char *this, const char *str)
587 return basic_string_char_compare_substr_cstr_len(this, 0, this->size,
588 str, char_traits_char_length(str));
591 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIABV12@II@Z */
592 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0AEBV12@00@Z */
593 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_substr_substr, 24)
594 int __thiscall basic_string_char_compare_substr_substr(
595 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
596 const basic_string_char *compare, MSVCP_size_t off, MSVCP_size_t count)
598 TRACE("%p %lu %lu %p %lu %lu\n", this, pos, num, compare, off, count);
600 if(compare->size < off)
601 _Xran();
603 if(count > compare->size-off)
604 count = compare->size-off;
606 return basic_string_char_compare_substr_cstr_len(this, pos, num,
607 compare->ptr+off, count);
610 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIABV12@@Z */
611 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0AEBV12@@Z */
612 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_substr, 16)
613 int __thiscall basic_string_char_compare_substr(
614 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
615 const basic_string_char *compare)
617 return basic_string_char_compare_substr_cstr_len(this, pos, num,
618 compare->ptr, compare->size);
621 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHABV12@@Z */
622 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAHAEBV12@@Z */
623 DEFINE_THISCALL_WRAPPER(basic_string_char_compare, 8)
624 int __thiscall basic_string_char_compare(
625 const basic_string_char *this, const basic_string_char *compare)
627 return basic_string_char_compare_substr_cstr_len(this, 0, this->size,
628 compare->ptr, compare->size);
631 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIPBD@Z */
632 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0PEBD@Z */
633 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_substr_cstr, 16)
634 int __thiscall basic_string_char_compare_substr_cstr(const basic_string_char *this,
635 MSVCP_size_t pos, MSVCP_size_t num, const char *str)
637 return basic_string_char_compare_substr_cstr_len(this, pos, num,
638 str, char_traits_char_length(str));
641 /* ??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
642 /* ??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
643 /* ??8std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
644 /* ??8std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
645 MSVCP_bool __cdecl basic_string_char_equal(
646 const basic_string_char *left, const basic_string_char *right)
648 return basic_string_char_compare(left, right) == 0;
651 /* ??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
652 /* ??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
653 /* ??8std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
654 /* ??8std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
655 MSVCP_bool __cdecl basic_string_char_equal_str_cstr(
656 const basic_string_char *left, const char *right)
658 return basic_string_char_compare_cstr(left, right) == 0;
661 /* ??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
662 /* ??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
663 /* ??8std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
664 /* ??8std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
665 MSVCP_bool __cdecl basic_string_char_equal_cstr_str(
666 const char *left, const basic_string_char *right)
668 return basic_string_char_compare_cstr(right, left) == 0;
671 /* ??$?9DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
672 /* ??$?9DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
673 /* ??9std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
674 /* ??9std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
675 MSVCP_bool __cdecl basic_string_char_not_equal(
676 const basic_string_char *left, const basic_string_char *right)
678 return basic_string_char_compare(left, right) != 0;
681 /* ??$?9DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
682 /* ??$?9DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
683 /* ??9std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
684 /* ??9std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
685 MSVCP_bool __cdecl basic_string_char_not_equal_str_cstr(
686 const basic_string_char *left, const char *right)
688 return basic_string_char_compare_cstr(left, right) != 0;
691 /* ??$?9DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
692 /* ??$?9DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
693 /* ??9std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
694 /* ??9std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
695 MSVCP_bool __cdecl basic_string_char_not_equal_cstr_str(
696 const char *left, const basic_string_char *right)
698 return basic_string_char_compare_cstr(right, left) != 0;
701 /* ??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
702 /* ??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
703 /* ??Mstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
704 /* ??Mstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
705 MSVCP_bool __cdecl basic_string_char_lower(
706 const basic_string_char *left, const basic_string_char *right)
708 return basic_string_char_compare(left, right) < 0;
711 /* ??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
712 /* ??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
713 /* ??Mstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
714 /* ??Mstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
715 MSVCP_bool __cdecl basic_string_char_lower_bstr_cstr(
716 const basic_string_char *left, const char *right)
718 return basic_string_char_compare_cstr(left, right) < 0;
721 /* ??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
722 /* ??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
723 /* ??Mstd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
724 /* ??Mstd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
725 MSVCP_bool __cdecl basic_string_char_lower_cstr_bstr(
726 const char *left, const basic_string_char *right)
728 return basic_string_char_compare_cstr(right, left) > 0;
731 /* ??$?NDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
732 /* ??$?NDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
733 /* ??Nstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
734 /* ??Nstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
735 MSVCP_bool __cdecl basic_string_char_leq(
736 const basic_string_char *left, const basic_string_char *right)
738 return basic_string_char_compare(left, right) <= 0;
741 /* ??$?NDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
742 /* ??$?NDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
743 /* ??Nstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
744 /* ??Nstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
745 MSVCP_bool __cdecl basic_string_char_leq_bstr_cstr(
746 const basic_string_char *left, const char *right)
748 return basic_string_char_compare_cstr(left, right) <= 0;
751 /* ??$?NDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
752 /* ??$?NDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
753 /* ??Nstd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
754 /* ??Nstd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
755 MSVCP_bool __cdecl basic_string_char_leq_cstr_bstr(
756 const char *left, const basic_string_char *right)
758 return basic_string_char_compare_cstr(right, left) >= 0;
761 /* ??$?ODU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
762 /* ??$?ODU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
763 /* ??Ostd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
764 /* ??Ostd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
765 MSVCP_bool __cdecl basic_string_char_greater(
766 const basic_string_char *left, const basic_string_char *right)
768 return basic_string_char_compare(left, right) > 0;
771 /* ??$?ODU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
772 /* ??$?ODU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
773 /* ??Ostd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
774 /* ??Ostd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
775 MSVCP_bool __cdecl basic_string_char_greater_bstr_cstr(
776 const basic_string_char *left, const char *right)
778 return basic_string_char_compare_cstr(left, right) > 0;
781 /* ??$?ODU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
782 /* ??$?ODU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
783 /* ??Ostd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
784 /* ??Ostd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
785 MSVCP_bool __cdecl basic_string_char_greater_cstr_bstr(
786 const char *left, const basic_string_char *right)
788 return basic_string_char_compare_cstr(right, left) < 0;
791 /* ??$?PDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
792 /* ??$?PDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
793 /* ??Pstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
794 /* ??Pstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
795 MSVCP_bool __cdecl basic_string_char_geq(
796 const basic_string_char *left, const basic_string_char *right)
798 return basic_string_char_compare(left, right) >= 0;
801 /* ??$?PDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
802 /* ??$?PDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
803 /* ??Pstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
804 /* ??Pstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
805 MSVCP_bool __cdecl basic_string_char_geq_bstr_cstr(
806 const basic_string_char *left, const char *right)
808 return basic_string_char_compare_cstr(left, right) >= 0;
811 /* ??$?PDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
812 /* ??$?PDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
813 /* ??Pstd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
814 /* ??Pstd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
815 MSVCP_bool __cdecl basic_string_char_geq_cstr_bstr(
816 const char *left, const basic_string_char *right)
818 return basic_string_char_compare_cstr(right, left) <= 0;
821 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
822 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
823 DEFINE_THISCALL_WRAPPER(basic_string_char_find_cstr_substr, 16)
824 MSVCP_size_t __thiscall basic_string_char_find_cstr_substr(
825 const basic_string_char *this, const char *find, MSVCP_size_t pos, MSVCP_size_t len)
827 const char *p, *end;
829 TRACE("%p %s %lu %lu\n", this, debugstr_an(find, len), pos, len);
831 if(len==0 && pos<=this->size)
832 return pos;
833 if(pos>=this->size || len>this->size)
834 return basic_string_char_npos;
836 end = this->ptr+this->size-len+1;
837 for(p=this->ptr+pos; p<end; p++) {
838 p = char_traits_char_find(p, end-p, find);
839 if(!p)
840 break;
842 if(!char_traits_char_compare(p, find, len))
843 return p-this->ptr;
846 return basic_string_char_npos;
849 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
850 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
851 DEFINE_THISCALL_WRAPPER(basic_string_char_find_off, 12)
852 MSVCP_size_t __thiscall basic_string_char_find_off(
853 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
855 return basic_string_char_find_cstr_substr(this, find->ptr, off, find->size);
858 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
859 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
860 DEFINE_THISCALL_WRAPPER(basic_string_char_find_ch, 12)
861 MSVCP_size_t __thiscall basic_string_char_find_ch(
862 const basic_string_char *this, char ch, MSVCP_size_t pos)
864 return basic_string_char_find_cstr_substr(this, &ch, pos, 1);
867 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
868 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
869 DEFINE_THISCALL_WRAPPER(basic_string_char_find_cstr_off, 12)
870 MSVCP_size_t __thiscall basic_string_char_find_cstr_off(
871 const basic_string_char *this, const char *find, MSVCP_size_t pos)
873 return basic_string_char_find_cstr_substr(this, find, pos,
874 char_traits_char_length(find));
877 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
878 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
879 DEFINE_THISCALL_WRAPPER(basic_string_char_rfind_cstr_substr, 16)
880 MSVCP_size_t __thiscall basic_string_char_rfind_cstr_substr(
881 const basic_string_char *this, const char *find, MSVCP_size_t pos, MSVCP_size_t len)
883 const char *p, *end;
885 TRACE("%p %s %lu %lu\n", this, debugstr_an(find, len), pos, len);
887 if(len==0)
888 return pos<this->size ? pos : this->size;
890 if(len > this->size)
891 return basic_string_char_npos;
893 if(pos > this->size-len+1)
894 pos = this->size-len+1;
895 end = this->ptr;
896 for(p=end+pos; p>=end; p--) {
897 if(*p==*find && !char_traits_char_compare(p, find, len))
898 return p-this->ptr;
901 return basic_string_char_npos;
904 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
905 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
906 DEFINE_THISCALL_WRAPPER(basic_string_char_rfind_off, 12)
907 MSVCP_size_t __thiscall basic_string_char_rfind_off(
908 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
910 return basic_string_char_rfind_cstr_substr(this, find->ptr, off, find->size);
913 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
914 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
915 DEFINE_THISCALL_WRAPPER(basic_string_char_rfind_ch, 12)
916 MSVCP_size_t __thiscall basic_string_char_rfind_ch(
917 const basic_string_char *this, char ch, MSVCP_size_t pos)
919 return basic_string_char_rfind_cstr_substr(this, &ch, pos, 1);
922 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
923 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
924 DEFINE_THISCALL_WRAPPER(basic_string_char_rfind_cstr_off, 12)
925 MSVCP_size_t __thiscall basic_string_char_rfind_cstr_off(
926 const basic_string_char *this, const char *find, MSVCP_size_t pos)
928 return basic_string_char_rfind_cstr_substr(this, find, pos,
929 char_traits_char_length(find));
932 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
933 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
934 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_not_of_cstr_substr, 16)
935 MSVCP_size_t __thiscall basic_string_char_find_first_not_of_cstr_substr(
936 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
938 const char *p, *end;
940 TRACE("%p %p %lu %lu\n", this, find, off, len);
942 if(off<this->size) {
943 end = this->ptr+this->size;
944 for(p=this->ptr+off; p<end; p++)
945 if(!char_traits_char_find(find, len, p))
946 return p-this->ptr;
949 return basic_string_char_npos;
952 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
953 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
954 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_not_of, 12)
955 MSVCP_size_t __thiscall basic_string_char_find_first_not_of(
956 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
958 return basic_string_char_find_first_not_of_cstr_substr(this,
959 find->ptr, off, find->size);
962 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
963 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
964 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_not_of_ch, 12)
965 MSVCP_size_t __thiscall basic_string_char_find_first_not_of_ch(
966 const basic_string_char *this, char ch, MSVCP_size_t off)
968 return basic_string_char_find_first_not_of_cstr_substr(this, &ch, off, 1);
971 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
972 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
973 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_not_of_cstr, 12)
974 MSVCP_size_t __thiscall basic_string_char_find_first_not_of_cstr(
975 const basic_string_char *this, const char *find, MSVCP_size_t off)
977 return basic_string_char_find_first_not_of_cstr_substr(
978 this, find, off, char_traits_char_length(find));
981 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
982 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
983 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_of_cstr_substr, 16)
984 MSVCP_size_t __thiscall basic_string_char_find_first_of_cstr_substr(
985 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
987 const char *p, *end;
989 TRACE("%p %p %lu %lu\n", this, find, off, len);
991 if(len>0 && off<this->size) {
992 end = this->ptr+this->size;
993 for(p=this->ptr+off; p<end; p++)
994 if(char_traits_char_find(find, len, p))
995 return p-this->ptr;
998 return basic_string_char_npos;
1001 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1002 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1003 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_of, 12)
1004 MSVCP_size_t __thiscall basic_string_char_find_first_of(
1005 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1007 return basic_string_char_find_first_of_cstr_substr(this,
1008 find->ptr, off, find->size);
1011 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1012 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1013 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_of_ch, 12)
1014 MSVCP_size_t __thiscall basic_string_char_find_first_of_ch(
1015 const basic_string_char *this, char ch, MSVCP_size_t off)
1017 return basic_string_char_find_first_of_cstr_substr(this, &ch, off, 1);
1020 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1021 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1022 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_of_cstr, 12)
1023 MSVCP_size_t __thiscall basic_string_char_find_first_of_cstr(
1024 const basic_string_char *this, const char *find, MSVCP_size_t off)
1026 return basic_string_char_find_first_of_cstr_substr(
1027 this, find, off, char_traits_char_length(find));
1030 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1031 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1032 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_not_of_cstr_substr, 16)
1033 MSVCP_size_t __thiscall basic_string_char_find_last_not_of_cstr_substr(
1034 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
1036 const char *p, *beg;
1038 TRACE("%p %p %lu %lu\n", this, find, off, len);
1040 if(len>0 && this->size>0) {
1041 if(off >= this->size)
1042 off = this->size-1;
1044 beg = this->ptr;
1045 for(p=beg+off; p>=beg; p--)
1046 if(!char_traits_char_find(find, len, p))
1047 return p-beg;
1050 return basic_string_char_npos;
1053 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1054 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1055 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_not_of, 12)
1056 MSVCP_size_t __thiscall basic_string_char_find_last_not_of(
1057 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1059 return basic_string_char_find_last_not_of_cstr_substr(this,
1060 find->ptr, off, find->size);
1063 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1064 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1065 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_not_of_ch, 12)
1066 MSVCP_size_t __thiscall basic_string_char_find_last_not_of_ch(
1067 const basic_string_char *this, char ch, MSVCP_size_t off)
1069 return basic_string_char_find_last_not_of_cstr_substr(this, &ch, off, 1);
1072 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1073 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1074 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_not_of_cstr, 12)
1075 MSVCP_size_t __thiscall basic_string_char_find_last_not_of_cstr(
1076 const basic_string_char *this, const char *find, MSVCP_size_t off)
1078 return basic_string_char_find_last_not_of_cstr_substr(
1079 this, find, off, char_traits_char_length(find));
1082 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1083 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1084 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_of_cstr_substr, 16)
1085 MSVCP_size_t __thiscall basic_string_char_find_last_of_cstr_substr(
1086 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
1088 const char *p, *beg;
1090 TRACE("%p %p %lu %lu\n", this, find, off, len);
1092 if(len>0 && this->size>0) {
1093 if(off >= this->size)
1094 off = this->size-1;
1096 beg = this->ptr;
1097 for(p=beg+off; p>=beg; p--)
1098 if(char_traits_char_find(find, len, p))
1099 return p-beg;
1102 return basic_string_char_npos;
1105 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1106 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1107 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_of, 12)
1108 MSVCP_size_t __thiscall basic_string_char_find_last_of(
1109 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1111 return basic_string_char_find_last_of_cstr_substr(this,
1112 find->ptr, off, find->size);
1115 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1116 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1117 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_of_ch, 12)
1118 MSVCP_size_t __thiscall basic_string_char_find_last_of_ch(
1119 const basic_string_char *this, char ch, MSVCP_size_t off)
1121 return basic_string_char_find_last_of_cstr_substr(this, &ch, off, 1);
1124 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1125 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1126 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_of_cstr, 12)
1127 MSVCP_size_t __thiscall basic_string_char_find_last_of_cstr(
1128 const basic_string_char *this, const char *find, MSVCP_size_t off)
1130 return basic_string_char_find_last_of_cstr_substr(
1131 this, find, off, char_traits_char_length(find));
1134 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */
1135 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
1136 DEFINE_THISCALL_WRAPPER(basic_string_char_append_substr, 16)
1137 basic_string_char* __thiscall basic_string_char_append_substr(basic_string_char *this,
1138 const basic_string_char *append, MSVCP_size_t offset, MSVCP_size_t count)
1140 TRACE("%p %p %lu %lu\n", this, append, offset, count);
1142 if(append->size < offset)
1143 _Xran();
1145 if(count > append->size-offset)
1146 count = append->size-offset;
1148 if(basic_string_char_npos-this->size<=count || this->size+count<this->size)
1149 _Xlen();
1151 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1152 if(append->ptr)
1153 char_traits_char__Copy_s(this->ptr+this->size, this->res-this->size,
1154 append->ptr+offset, count);
1155 basic_string_char__Eos(this, this->size+count);
1158 return this;
1161 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z */
1162 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z */
1163 DEFINE_THISCALL_WRAPPER(basic_string_char_append_cstr_len, 12)
1164 basic_string_char* __thiscall basic_string_char_append_cstr_len(
1165 basic_string_char *this, const char *append, MSVCP_size_t count)
1167 TRACE("%p %s %lu\n", this, debugstr_an(append, count), count);
1169 if(basic_string_char_inside(this, append))
1170 return basic_string_char_append_substr(this, this, append-this->ptr, count);
1172 if(basic_string_char_npos-this->size<=count || this->size+count<this->size)
1173 _Xlen();
1175 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1176 char_traits_char__Copy_s(this->ptr+this->size,
1177 this->res-this->size, append, count);
1178 basic_string_char__Eos(this, this->size+count);
1181 return this;
1184 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */
1185 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KD@Z */
1186 DEFINE_THISCALL_WRAPPER(basic_string_char_append_len_ch, 12)
1187 basic_string_char* __thiscall basic_string_char_append_len_ch(
1188 basic_string_char *this, MSVCP_size_t count, char ch)
1190 TRACE("%p %lu %c\n", this, count, ch);
1192 if(basic_string_char_npos-this->size <= count)
1193 _Xlen();
1195 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1196 char_traits_char_assignn(this->ptr+this->size, count, ch);
1197 basic_string_char__Eos(this, this->size+count);
1200 return this;
1203 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */
1204 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */
1205 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z */
1206 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@AEBV01@@Z */
1207 DEFINE_THISCALL_WRAPPER(basic_string_char_append, 8)
1208 basic_string_char* __thiscall basic_string_char_append(
1209 basic_string_char *this, const basic_string_char *append)
1211 return basic_string_char_append_substr(this, append,
1212 0, basic_string_char_npos);
1215 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@D@Z */
1216 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@D@Z */
1217 DEFINE_THISCALL_WRAPPER(basic_string_char_append_ch, 8)
1218 basic_string_char* __thiscall basic_string_char_append_ch(
1219 basic_string_char *this, char ch)
1221 return basic_string_char_append_len_ch(this, 1, ch);
1224 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD0@Z */
1225 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD0@Z */
1226 DEFINE_THISCALL_WRAPPER(basic_string_char_append_beg_end, 12)
1227 basic_string_char* __thiscall basic_string_char_append_beg_end(
1228 basic_string_char *this, const char *beg, const char *end)
1230 return basic_string_char_append_cstr_len(this, beg, end-beg);
1233 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z */
1234 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD@Z */
1235 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z */
1236 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@PEBD@Z */
1237 DEFINE_THISCALL_WRAPPER(basic_string_char_append_cstr, 8)
1238 basic_string_char* __thiscall basic_string_char_append_cstr(
1239 basic_string_char *this, const char *append)
1241 return basic_string_char_append_cstr_len(this, append,
1242 char_traits_char_length(append));
1244 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z */
1245 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@0@Z */
1246 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z */
1247 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@0@Z */
1248 basic_string_char* __cdecl basic_string_char_concatenate(basic_string_char *ret,
1249 const basic_string_char *left, const basic_string_char *right)
1251 TRACE("%p %p\n", left, right);
1253 basic_string_char_copy_ctor(ret, left);
1254 basic_string_char_append(ret, right);
1255 return ret;
1258 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@D@Z */
1259 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@D@Z */
1260 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@D@Z */
1261 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@D@Z */
1262 basic_string_char* __cdecl basic_string_char_concatenate_bstr_ch(basic_string_char *ret,
1263 const basic_string_char *left, char right)
1265 TRACE("%p %c\n", left, right);
1267 basic_string_char_copy_ctor(ret, left);
1268 basic_string_char_append_ch(ret, right);
1269 return ret;
1272 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z */
1273 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@PEBD@Z */
1274 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z */
1275 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@PEBD@Z */
1276 basic_string_char* __cdecl basic_string_char_concatenate_bstr_cstr(basic_string_char *ret,
1277 const basic_string_char *left, const char *right)
1279 TRACE("%p %s\n", left, debugstr_a(right));
1281 basic_string_char_copy_ctor(ret, left);
1282 basic_string_char_append_cstr(ret, right);
1283 return ret;
1286 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DABV10@@Z */
1287 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DAEBV10@@Z */
1288 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DABV10@@Z */
1289 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DAEBV10@@Z */
1290 basic_string_char* __cdecl basic_string_char_concatenate_ch_bstr(basic_string_char *ret,
1291 char left, const basic_string_char *right)
1293 TRACE("%c %p\n", left, right);
1295 basic_string_char_ctor_cstr_len_alloc(ret, &left, 1, NULL);
1296 basic_string_char_append(ret, right);
1297 return ret;
1300 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z */
1301 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBDAEBV10@@Z */
1302 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z */
1303 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBDAEBV10@@Z */
1304 basic_string_char* __cdecl basic_string_char_concatenate_cstr_bstr(basic_string_char *ret,
1305 const char *left, const basic_string_char *right)
1307 TRACE("%s %p\n", debugstr_a(left), right);
1309 basic_string_char_ctor_cstr_alloc(ret, left, NULL);
1310 basic_string_char_append(ret, right);
1311 return ret;
1314 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */
1315 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */
1316 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */
1317 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */
1318 DEFINE_THISCALL_WRAPPER(basic_string_char_operator_at, 8)
1319 char* __thiscall basic_string_char_operator_at(
1320 basic_string_char *this, MSVCP_size_t pos)
1322 TRACE("%p %lu\n", this, pos);
1324 assert(this->size >= pos);
1325 return this->ptr+pos;
1328 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */
1329 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */
1330 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */
1331 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */
1332 DEFINE_THISCALL_WRAPPER(basic_string_char_at, 8)
1333 char* __thiscall basic_string_char_at(
1334 basic_string_char *this, MSVCP_size_t pos)
1336 TRACE("%p %lu\n", this, pos);
1338 if(this->size <= pos)
1339 _Xran();
1341 return this->ptr+pos;
1344 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBDI@Z */
1345 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD0@Z */
1346 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_cstr_len, 20)
1347 basic_string_char* __thiscall basic_string_char_replace_cstr_len(basic_string_char *this,
1348 MSVCP_size_t off, MSVCP_size_t len, const char *str, MSVCP_size_t str_len)
1350 MSVCP_size_t inside_pos = -1;
1351 char *ptr = this->ptr;
1353 TRACE("%p %ld %ld %p %ld\n", this, off, len, str, str_len);
1355 if(this->size < off)
1356 _Xran();
1358 if(len > this->size-off)
1359 len = this->size-off;
1361 if(basic_string_char_npos-str_len <= this->size-len)
1362 _Xlen();
1364 if(basic_string_char_inside(this, str))
1365 inside_pos = str-ptr;
1367 if(this->size-len+str_len)
1368 basic_string_char__Grow(this, this->size-len+str_len, FALSE);
1369 ptr = this->ptr;
1371 if(inside_pos == -1) {
1372 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1373 memcpy(ptr+off, str, str_len*sizeof(char));
1374 } else if(len >= str_len) {
1375 memmove(ptr+off, ptr+inside_pos, str_len*sizeof(char));
1376 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1377 } else {
1378 MSVCP_size_t size;
1380 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1382 if(inside_pos < off+len) {
1383 size = off+len-inside_pos;
1384 if(size > str_len)
1385 size = str_len;
1386 memmove(ptr+off, ptr+inside_pos, size*sizeof(char));
1387 } else {
1388 size = 0;
1391 if(str_len > size)
1392 memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(char));
1395 if(this->ptr)
1396 basic_string_char__Eos(this, this->size-len+str_len);
1397 return this;
1400 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@II@Z */
1401 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0AEBV12@00@Z */
1402 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_substr, 24)
1403 basic_string_char* __thiscall basic_string_char_replace_substr(basic_string_char *this, MSVCP_size_t off,
1404 MSVCP_size_t len, const basic_string_char *str, MSVCP_size_t str_off, MSVCP_size_t str_len)
1406 if(str->size < str_off)
1407 _Xran();
1409 if(str_len > str->size-str_off)
1410 str_len = str->size-str_off;
1412 return basic_string_char_replace_cstr_len(this, off, len,
1413 str->ptr+str_off, str_len);
1416 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@@Z */
1417 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0AEBV12@@Z */
1418 DEFINE_THISCALL_WRAPPER(basic_string_char_replace, 16)
1419 basic_string_char* __thiscall basic_string_char_replace(basic_string_char *this,
1420 MSVCP_size_t off, MSVCP_size_t len, const basic_string_char *str)
1422 return basic_string_char_replace_cstr_len(this, off, len,
1423 str->ptr, str->size);
1426 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIID@Z */
1427 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K00D@Z */
1428 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_ch, 20)
1429 basic_string_char* __thiscall basic_string_char_replace_ch(basic_string_char *this,
1430 MSVCP_size_t off, MSVCP_size_t len, MSVCP_size_t count, char ch)
1432 char *ptr;
1434 TRACE("%p %ld %ld %ld %c\n", this, off, len, count, ch);
1436 if(this->size < off)
1437 _Xran();
1439 if(len > this->size-off)
1440 len = this->size-off;
1442 if(basic_string_char_npos-count <= this->size-len)
1443 _Xlen();
1445 if(this->size-len+count)
1446 basic_string_char__Grow(this, this->size-len+count, FALSE);
1447 ptr = this->ptr;
1449 memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(char));
1450 char_traits_char_assignn(ptr+off, count, ch);
1451 basic_string_char__Eos(this, this->size-len+count);
1453 return this;
1456 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBD@Z */
1457 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD@Z */
1458 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_cstr, 16)
1459 basic_string_char* __thiscall basic_string_char_replace_cstr(basic_string_char *this,
1460 MSVCP_size_t off, MSVCP_size_t len, const char *str)
1462 return basic_string_char_replace_cstr_len(this, off, len, str,
1463 char_traits_char_length(str));
1466 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0ABV12@@Z */
1467 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0AEBV12@@Z */
1468 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_bstr, 16)
1469 basic_string_char* __thiscall basic_string_char_replace_iter_bstr(basic_string_char *this,
1470 char *beg, char *end, const basic_string_char *str)
1472 return basic_string_char_replace(this, basic_string_char__Pdif(beg, this->ptr),
1473 basic_string_char__Pdif(end, beg), str);
1476 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0ID@Z */
1477 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0_KD@Z */
1478 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_chn, 20)
1479 basic_string_char* __thiscall basic_string_char_replace_iter_chn(basic_string_char *this,
1480 char *beg, char *end, MSVCP_size_t count, char ch)
1482 return basic_string_char_replace_ch(this, basic_string_char__Pdif(beg, this->ptr),
1483 basic_string_char__Pdif(end, beg), count, ch);
1486 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBD1@Z */
1487 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD1@Z */
1488 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_iter, 20)
1489 basic_string_char* __thiscall basic_string_char_replace_iter_iter(basic_string_char *this,
1490 char *beg1, char *end1, const char *beg2, const char *end2)
1492 return basic_string_char_replace_cstr_len(this, basic_string_char__Pdif(beg1, this->ptr),
1493 basic_string_char__Pdif(end1, beg1), beg2, basic_string_char__Pdif(end2, beg2));
1496 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBD@Z */
1497 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD@Z */
1498 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr, 16)
1499 basic_string_char* __thiscall basic_string_char_replace_iter_cstr(basic_string_char *this,
1500 char *beg, char *end, const char *str)
1502 return basic_string_char_replace_cstr(this, basic_string_char__Pdif(beg, this->ptr),
1503 basic_string_char__Pdif(end, beg), str);
1506 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBDI@Z */
1507 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD_K@Z */
1508 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr_len, 20)
1509 basic_string_char* __thiscall basic_string_char_replace_iter_cstr_len(basic_string_char *this,
1510 char *beg, char *end, const char *str, MSVCP_size_t len)
1512 return basic_string_char_replace_cstr_len(this, basic_string_char__Pdif(beg, this->ptr),
1513 basic_string_char__Pdif(end, beg), str, len);
1516 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IABV12@@Z */
1517 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KAEBV12@@Z */
1518 DEFINE_THISCALL_WRAPPER(basic_string_char_insert, 12)
1519 basic_string_char* __thiscall basic_string_char_insert(basic_string_char *this,
1520 MSVCP_size_t off, const basic_string_char *str)
1522 return basic_string_char_replace(this, off, 0, str);
1525 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IABV12@II@Z */
1526 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KAEBV12@00@Z */
1527 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_substr, 20)
1528 basic_string_char* __thiscall basic_string_char_insert_substr(
1529 basic_string_char *this, MSVCP_size_t off, const basic_string_char *str,
1530 MSVCP_size_t str_off, MSVCP_size_t str_count)
1532 return basic_string_char_replace_substr(this, off, 0, str, str_off, str_count);
1535 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IPBD@Z */
1536 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KPEBD@Z */
1537 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_cstr, 12)
1538 basic_string_char* __thiscall basic_string_char_insert_cstr(
1539 basic_string_char *this, MSVCP_size_t off, const char *str)
1541 return basic_string_char_replace_cstr(this, off, 0, str);
1544 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IPBDI@Z */
1545 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KPEBD0@Z */
1546 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_cstr_len, 16)
1547 basic_string_char* __thiscall basic_string_char_insert_cstr_len(basic_string_char *this,
1548 MSVCP_size_t off, const char *str, MSVCP_size_t str_len)
1550 return basic_string_char_replace_cstr_len(this, off, 0, str, str_len);
1553 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IID@Z */
1554 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0D@Z */
1555 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_chn, 16)
1556 basic_string_char* __thiscall basic_string_char_insert_chn(basic_string_char *this,
1557 MSVCP_size_t off, MSVCP_size_t count, char ch)
1559 return basic_string_char_replace_ch(this, off, 0, count, ch);
1562 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPADD@Z */
1563 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEADD@Z */
1564 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter_ch, 12)
1565 char* __thiscall basic_string_char_insert_iter_ch(basic_string_char *this, char *pos, char ch)
1567 MSVCP_size_t off = basic_string_char__Pdif(pos, this->ptr);
1568 basic_string_char_insert_chn(this, off, 1, ch);
1569 return basic_string_char__Psum(this->ptr, off);
1572 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXPADID@Z */
1573 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXPEAD_KD@Z */
1574 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter_chn, 16)
1575 void __thiscall basic_string_char_insert_iter_chn(basic_string_char *this,
1576 char *pos, MSVCP_size_t n, char ch)
1578 basic_string_char_insert_chn(this, basic_string_char__Pdif(pos, this->ptr), n, ch);
1581 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXPADPBD1@Z */
1582 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXPEADPEBD1@Z */
1583 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter, 16)
1584 void __thiscall basic_string_char_insert_iter(basic_string_char *this,
1585 char *pos, const char *beg, const char *end)
1587 basic_string_char_insert_cstr_len(this, basic_string_char__Pdif(pos, this->ptr),
1588 beg, basic_string_char__Pdif(end, beg));
1591 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXID@Z */
1592 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_KD@Z */
1593 DEFINE_THISCALL_WRAPPER(basic_string_char_resize_ch, 12)
1594 void __thiscall basic_string_char_resize_ch(
1595 basic_string_char *this, MSVCP_size_t size, char ch)
1597 TRACE("%p %lu %c\n", this, size, ch);
1599 if(size <= this->size)
1600 basic_string_char_erase(this, size, this->size);
1601 else
1602 basic_string_char_append_len_ch(this, size-this->size, ch);
1605 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z */
1606 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z */
1607 DEFINE_THISCALL_WRAPPER(basic_string_char_resize, 8)
1608 void __thiscall basic_string_char_resize(
1609 basic_string_char *this, MSVCP_size_t size)
1611 basic_string_char_resize_ch(this, size, '\0');
1614 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADXZ */
1615 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADXZ */
1616 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1617 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1618 DEFINE_THISCALL_WRAPPER(basic_string_char_begin, 4)
1619 char* __thiscall basic_string_char_begin(basic_string_char *this)
1621 TRACE("(%p)\n", this);
1622 basic_string_char__Freeze(this);
1623 return this->ptr;
1626 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADXZ */
1627 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADXZ */
1628 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1629 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1630 DEFINE_THISCALL_WRAPPER(basic_string_char_end, 4)
1631 char* __thiscall basic_string_char_end(basic_string_char *this)
1633 TRACE("(%p)\n", this);
1634 basic_string_char__Freeze(this);
1635 return this->ptr+this->size;
1638 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@PADDAADPADH@2@XZ */
1639 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@PEADDAEADPEAD_J@2@XZ */
1640 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@PBDDABDPBDH@2@XZ */
1641 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@PEBDDAEBDPEBD_J@2@XZ */
1642 DEFINE_THISCALL_WRAPPER(basic_string_char_rbegin, 8)
1643 String_reverse_iterator_char* __thiscall basic_string_char_rbegin(
1644 basic_string_char *this, String_reverse_iterator_char *ret)
1646 TRACE("(%p %p)\n", this, ret);
1647 ret->ptr = basic_string_char_end(this);
1648 return ret;
1651 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@PADDAADPADH@2@XZ */
1652 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@PEADDAEADPEAD_J@2@XZ */
1653 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@PBDDABDPBDH@2@XZ */
1654 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@PEBDDAEBDPEBD_J@2@XZ */
1655 DEFINE_THISCALL_WRAPPER(basic_string_char_rend, 8)
1656 String_reverse_iterator_char* __thiscall basic_string_char_rend(
1657 basic_string_char *this, String_reverse_iterator_char *ret)
1659 TRACE("(%p %p)\n", this, ret);
1660 ret->ptr = basic_string_char_begin(this);
1661 return ret;
1664 /* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1665 /* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1666 /* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1667 /* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1668 DEFINE_THISCALL_WRAPPER(basic_string_char_c_str, 4)
1669 const char* __thiscall basic_string_char_c_str(const basic_string_char *this)
1671 TRACE("%p\n", this);
1672 return this->ptr ? this->ptr : basic_string_char__Nullstr();
1675 /* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1676 /* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1677 /* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1678 /* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1679 DEFINE_THISCALL_WRAPPER(basic_string_char_length, 4)
1680 MSVCP_size_t __thiscall basic_string_char_length(const basic_string_char *this)
1682 TRACE("%p\n", this);
1683 return this->size;
1686 /* ?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1687 /* ?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1688 DEFINE_THISCALL_WRAPPER(basic_string_char_max_size, 4)
1689 MSVCP_size_t __thiscall basic_string_char_max_size(const basic_string_char *this)
1691 TRACE("%p\n", this);
1692 return MSVCP_allocator_char_max_size(NULL)-1;
1695 /* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1696 /* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1697 DEFINE_THISCALL_WRAPPER(basic_string_char_capacity, 4)
1698 MSVCP_size_t __thiscall basic_string_char_capacity(basic_string_char *this)
1700 TRACE("%p\n", this);
1701 return this->res;
1704 /* ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z */
1705 /* ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z */
1706 DEFINE_THISCALL_WRAPPER(basic_string_char_reserve, 8)
1707 void __thiscall basic_string_char_reserve(basic_string_char *this, MSVCP_size_t size)
1709 MSVCP_size_t len;
1711 TRACE("%p %ld\n", this, size);
1713 len = this->size;
1714 if(len > size)
1715 return;
1717 if(basic_string_char__Grow(this, size, FALSE))
1718 basic_string_char__Eos(this, len);
1721 /* ?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE_NXZ */
1722 /* ?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_NXZ */
1723 DEFINE_THISCALL_WRAPPER(basic_string_char_empty, 4)
1724 MSVCP_bool __thiscall basic_string_char_empty(basic_string_char *this)
1726 TRACE("%p\n", this);
1727 return this->size == 0;
1730 /* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXAAV12@@Z */
1731 /* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEAV12@@Z */
1732 DEFINE_THISCALL_WRAPPER(basic_string_char_swap, 8)
1733 void __thiscall basic_string_char_swap(basic_string_char *this, basic_string_char *str)
1735 basic_string_char tmp;
1736 TRACE("%p %p\n", this, str);
1738 tmp = *this;
1739 *this = *str;
1740 *str = tmp;
1743 /* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV12@II@Z */
1744 /* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV12@_K0@Z */
1745 DEFINE_THISCALL_WRAPPER(basic_string_char_substr, 16)
1746 basic_string_char* __thiscall basic_string_char_substr(basic_string_char *this,
1747 basic_string_char *ret, MSVCP_size_t off, MSVCP_size_t len)
1749 TRACE("%p %lu %lu\n", this, off, len);
1751 basic_string_char_ctor_substr_alloc(ret, this, off, len, NULL);
1752 return ret;
1755 /* ?copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPADII@Z */
1756 /* ?copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEAD_K1@Z */
1757 DEFINE_THISCALL_WRAPPER(basic_string_char_copy, 16)
1758 MSVCP_size_t __thiscall basic_string_char_copy(const basic_string_char *this,
1759 char *dest, MSVCP_size_t count, MSVCP_size_t off)
1761 TRACE("%p %p %lu %lu\n", this, dest, count, off);
1763 if(off > this->size)
1764 _Xran();
1765 if(count > this->size-off)
1766 count = this->size-off;
1767 if(this->ptr)
1768 char_traits_char__Copy_s(dest, count, this->ptr+off, count);
1769 return count;
1772 /* ?get_allocator@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$allocator@D@2@XZ */
1773 /* ?get_allocator@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$allocator@D@2@XZ */
1774 DEFINE_THISCALL_WRAPPER(basic_string_char_get_allocator, 8)
1775 allocator* __thiscall basic_string_char_get_allocator(const basic_string_char *this, allocator *ret)
1777 TRACE("%p\n", this);
1778 return ret;
1781 static wchar_t* char_traits_wchar__Move_s(wchar_t *dest,
1782 MSVCP_size_t size, const wchar_t *src, MSVCP_size_t count)
1784 if(!dest || !src || size<count) {
1785 if(dest && size)
1786 dest[0] = '\0';
1787 _invalid_parameter(NULL, NULL, NULL, 0, 0);
1788 return dest;
1791 return memmove(dest, src, count * sizeof(WCHAR));
1794 static wchar_t* char_traits_wchar__Copy_s(wchar_t *dest,
1795 MSVCP_size_t size, const wchar_t *src, MSVCP_size_t count)
1797 if(!dest || !src || size<count) {
1798 if(dest && size)
1799 dest[0] = '\0';
1800 _invalid_parameter(NULL, NULL, NULL, 0, 0);
1801 return dest;
1804 return memcpy(dest, src, count * sizeof(wchar_t));
1807 static MSVCP_size_t char_traits_wchar_length(const wchar_t *str)
1809 return wcslen((WCHAR*)str);
1812 static wchar_t* char_traits_wchar_assignn(wchar_t *str,
1813 MSVCP_size_t num, wchar_t c)
1815 MSVCP_size_t i;
1817 for(i=0; i<num; i++)
1818 str[i] = c;
1820 return str;
1823 static int char_traits_wchar_compare(const wchar_t *s1,
1824 const wchar_t *s2, MSVCP_size_t count)
1826 int ret = memcmp(s1, s2, count);
1827 return (ret>0 ? 1 : (ret<0 ? -1 : 0));
1830 static const wchar_t* char_traits_wchar_find(const wchar_t *str,
1831 MSVCP_size_t range, const wchar_t *c)
1833 return memchr(str, *c, range);
1836 static MSVCP_bool basic_string_wchar_inside(
1837 basic_string_wchar *this, const wchar_t *ptr)
1839 return ptr>=this->ptr && ptr<this->ptr+this->size;
1842 /* ?npos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@2IB */
1843 /* ?npos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@2_KB */
1844 const MSVCP_size_t basic_string_wchar_npos = -1;
1846 /* ?_C@?1??_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGXZ@4GB */
1847 /* ?_C@?1??_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGXZ@4GB */
1848 const wchar_t basic_string_wchar_nullbyte = '\0';
1850 /* ?_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGXZ */
1851 /* ?_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGXZ */
1852 const wchar_t* __cdecl basic_string_wchar__Nullstr(void)
1854 return &basic_string_wchar_nullbyte;
1857 /* ?_Refcnt@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEAAEPBG@Z */
1858 /* ?_Refcnt@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAAEAEPEBG@Z */
1859 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Refcnt, 8)
1860 unsigned short* __thiscall basic_string_wchar__Refcnt(basic_string_wchar *this, const wchar_t *ptr)
1862 TRACE("(%p %p)\n", this, ptr);
1863 return (unsigned short*)ptr-1;
1866 /* ?_Eos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXI@Z */
1867 /* ?_Eos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_K@Z */
1868 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Eos, 8)
1869 void __thiscall basic_string_wchar__Eos(basic_string_wchar *this, MSVCP_size_t len)
1871 this->size = len;
1872 this->ptr[len] = 0;
1875 void basic_string_wchar_clear(basic_string_wchar *this)
1877 if(this->ptr)
1878 basic_string_wchar__Eos(this, 0);
1881 /* ?_Tidy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEX_N@Z */
1882 /* ?_Tidy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_N@Z */
1883 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Tidy, 8)
1884 void __thiscall basic_string_wchar__Tidy(basic_string_wchar *this, MSVCP_bool built)
1886 TRACE("(%p %d)\n", this, built);
1888 if(!built || !this->ptr);
1889 else if(!this->ptr[-1] || (unsigned short)this->ptr[-1]==FROZEN)
1890 MSVCP_allocator_wchar_deallocate(NULL, this->ptr-1, this->res+2);
1891 else
1892 this->ptr[-1]--;
1894 memset(this, 0, sizeof(*this));
1897 /* ?_Grow@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAE_NI_N@Z */
1898 /* ?_Grow@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAA_N_K_N@Z */
1899 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Grow, 12)
1900 MSVCP_bool __thiscall basic_string_wchar__Grow(basic_string_wchar *this, MSVCP_size_t new_size, MSVCP_bool trim)
1902 if(!new_size) {
1903 if(trim)
1904 basic_string_wchar__Tidy(this, TRUE);
1905 else if(this->ptr)
1906 basic_string_wchar__Eos(this, 0);
1907 } else if(this->res<new_size || trim ||
1908 (this->ptr && this->ptr[-1] && (unsigned short)this->ptr[-1]!=FROZEN)) {
1909 MSVCP_size_t new_res = new_size, len = this->size;
1910 wchar_t *ptr;
1912 if(!trim && this->ptr && !this->ptr[-1]) {
1913 new_res |= 0xf;
1914 if(new_res/3 < this->res/2)
1915 new_res = this->res + this->res/2;
1918 ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_res+2);
1919 if(!ptr) {
1920 new_res = new_size;
1921 ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_size+2);
1923 if(!ptr) {
1924 ERR("Out of memory\n");
1925 return FALSE;
1928 if(len > new_res)
1929 len = new_res;
1931 *ptr = 0;
1932 if(this->ptr)
1933 char_traits_wchar__Copy_s(ptr+1, new_size, this->ptr, len);
1934 basic_string_wchar__Tidy(this, TRUE);
1935 this->ptr = ptr+1;
1936 this->res = new_res;
1937 basic_string_wchar__Eos(this, len);
1940 return new_size>0;
1943 /* ?_Split@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXXZ */
1944 /* ?_Split@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAXXZ */
1945 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Split, 4)
1946 void __thiscall basic_string_wchar__Split(basic_string_wchar *this)
1948 MSVCP_size_t len;
1949 wchar_t *ptr;
1951 TRACE("(%p)\n", this);
1953 if(!this->ptr || !this->ptr[-1] || (unsigned short)this->ptr[-1]==FROZEN)
1954 return;
1956 ptr = this->ptr;
1957 len = this->size;
1958 basic_string_wchar__Tidy(this, TRUE);
1959 if(basic_string_wchar__Grow(this, len, FALSE)) {
1960 if(ptr)
1961 char_traits_wchar__Copy_s(this->ptr, this->res, ptr, len);
1962 basic_string_wchar__Eos(this, len);
1966 /* ?_Freeze@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXXZ */
1967 /* ?_Freeze@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAXXZ */
1968 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Freeze, 4)
1969 void __thiscall basic_string_wchar__Freeze(basic_string_wchar *this)
1971 TRACE("(%p)\n", this);
1972 basic_string_wchar__Split(this);
1973 if(this->ptr)
1974 this->ptr[-1] = FROZEN;
1977 /* ?_Copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXI@Z */
1978 /* ?_Copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_K@Z */
1979 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Copy, 8)
1980 void __thiscall basic_string_wchar__Copy(basic_string_wchar *this, MSVCP_size_t copy_len)
1982 TRACE("%p %lu\n", this, copy_len);
1984 if(!basic_string_wchar__Grow(this, copy_len, TRUE))
1985 return;
1988 /* ?_Pdif@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAIPBG0@Z */
1989 /* ?_Pdif@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CA_KPEBG0@Z */
1990 MSVCP_size_t __cdecl basic_string_wchar__Pdif(const wchar_t *i1, const wchar_t *i2)
1992 TRACE("(%p %p)\n", i1, i2);
1993 return !i1 ? 0 : i1-i2;
1996 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPAGPAGI@Z */
1997 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEAGPEAG_K@Z */
1998 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGPBGI@Z */
1999 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGPEBG_K@Z */
2000 wchar_t* __cdecl basic_string_wchar__Psum(wchar_t *iter, MSVCP_size_t add)
2002 TRACE("(%p %lu)\n", iter, add);
2003 return iter ? iter+add : iter;
2006 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@II@Z */
2007 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0@Z */
2008 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase, 12)
2009 basic_string_wchar* __thiscall basic_string_wchar_erase(
2010 basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t len)
2012 TRACE("%p %lu %lu\n", this, pos, len);
2014 if(pos > this->size)
2015 _Xran();
2017 if(len > this->size-pos)
2018 len = this->size-pos;
2020 if(len) {
2021 basic_string_wchar__Split(this);
2022 char_traits_wchar__Move_s(this->ptr+pos, this->res-pos,
2023 this->ptr+pos+len, this->size-pos-len);
2024 basic_string_wchar__Eos(this, this->size-len);
2027 return this;
2030 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAG0@Z */
2031 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAG0@Z */
2032 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase_iter, 12)
2033 wchar_t* __thiscall basic_string_wchar_erase_iter(basic_string_wchar *this, wchar_t *beg, wchar_t *end)
2035 MSVCP_size_t pos = basic_string_wchar__Pdif(beg, this->ptr);
2036 basic_string_wchar_erase(this, pos, basic_string_wchar__Pdif(end, beg));
2037 return basic_string_wchar__Psum(this->ptr, pos);
2040 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAG@Z */
2041 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAG@Z */
2042 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase_beg, 8)
2043 wchar_t* __thiscall basic_string_wchar_erase_beg(basic_string_wchar *this, wchar_t *beg)
2045 MSVCP_size_t pos = beg-this->ptr;
2046 basic_string_wchar_erase(this, pos, 1);
2047 return this->ptr+pos;
2050 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@II@Z */
2051 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
2052 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_substr, 16)
2053 basic_string_wchar* __thiscall basic_string_wchar_assign_substr(
2054 basic_string_wchar *this, const basic_string_wchar *assign,
2055 MSVCP_size_t pos, MSVCP_size_t len)
2057 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
2059 if(assign->size < pos)
2060 _Xran();
2062 if(len > assign->size-pos)
2063 len = assign->size-pos;
2065 if(this == assign) {
2066 basic_string_wchar_erase(this, pos+len, basic_string_wchar_npos);
2067 basic_string_wchar_erase(this, 0, pos);
2068 } else if(basic_string_wchar__Grow(this, len, FALSE)) {
2069 if(assign->ptr)
2070 char_traits_wchar__Copy_s(this->ptr, this->res,
2071 assign->ptr+pos, len);
2072 basic_string_wchar__Eos(this, len);
2075 return this;
2078 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBGI@Z */
2079 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG_K@Z */
2080 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_cstr_len, 12)
2081 basic_string_wchar* __thiscall basic_string_wchar_assign_cstr_len(
2082 basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
2084 TRACE("%p %s %lu\n", this, debugstr_wn(str, len), len);
2086 if(basic_string_wchar_inside(this, str))
2087 return basic_string_wchar_assign_substr(this, this, str-this->ptr, len);
2088 else if(basic_string_wchar__Grow(this, len, FALSE)) {
2089 char_traits_wchar__Copy_s(this->ptr, this->res, str, len);
2090 basic_string_wchar__Eos(this, len);
2093 return this;
2096 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@@Z */
2097 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@@Z */
2098 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@ABV01@@Z */
2099 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@AEBV01@@Z */
2100 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign, 8)
2101 basic_string_wchar* __thiscall basic_string_wchar_assign(
2102 basic_string_wchar *this, const basic_string_wchar *assign)
2104 return basic_string_wchar_assign_substr(this, assign,
2105 0, basic_string_wchar_npos);
2108 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG@Z */
2109 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG@Z */
2110 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@PBG@Z */
2111 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@PEBG@Z */
2112 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_cstr, 8)
2113 basic_string_wchar* __thiscall basic_string_wchar_assign_cstr(
2114 basic_string_wchar *this, const wchar_t *str)
2116 return basic_string_wchar_assign_cstr_len(this, str,
2117 char_traits_wchar_length(str));
2120 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@G@Z */
2121 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@G@Z */
2122 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_ch, 8)
2123 basic_string_wchar* __thiscall basic_string_wchar_assign_ch(
2124 basic_string_wchar *this, wchar_t ch)
2126 return basic_string_wchar_assign_cstr_len(this, &ch, 1);
2129 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IG@Z */
2130 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KG@Z */
2131 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assignn, 12)
2132 basic_string_wchar* __thiscall basic_string_wchar_assignn(
2133 basic_string_wchar *this, MSVCP_size_t count, wchar_t ch)
2135 TRACE("%p %ld %c\n", this, count, ch);
2137 basic_string_wchar__Grow(this, count, FALSE);
2138 char_traits_wchar_assignn(this->ptr, count, ch);
2139 basic_string_wchar__Eos(this, count);
2140 return this;
2143 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG0@Z */
2144 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG0@Z */
2145 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_ptr_ptr, 12)
2146 basic_string_wchar* __thiscall basic_string_wchar_assign_ptr_ptr(
2147 basic_string_wchar *this, const wchar_t *first, const wchar_t *last)
2149 return basic_string_wchar_assign_cstr_len(this, first, last-first);
2152 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBGIABV?$allocator@G@1@@Z */
2153 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG_KAEBV?$allocator@G@1@@Z */
2154 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_cstr_len_alloc, 16)
2155 basic_string_wchar* __thiscall basic_string_wchar_ctor_cstr_len_alloc(
2156 basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len, const void *alloc)
2158 TRACE("%p %s %ld\n", this, debugstr_wn(str, len), len);
2160 basic_string_wchar__Tidy(this, FALSE);
2161 basic_string_wchar_assign_cstr_len(this, str, len);
2162 return this;
2165 basic_string_wchar* basic_string_wchar_ctor_cstr_len(basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
2167 return basic_string_wchar_ctor_cstr_len_alloc(this, str, len, NULL);
2170 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV01@IIABV?$allocator@G@1@@Z */
2171 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV01@_K1AEBV?$allocator@G@1@@Z */
2172 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_substr_alloc, 20)
2173 basic_string_wchar* __thiscall basic_string_wchar_ctor_substr_alloc(
2174 basic_string_wchar *this, const basic_string_wchar *assign,
2175 MSVCP_size_t pos, MSVCP_size_t len, const void *alloc)
2177 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
2179 basic_string_wchar__Tidy(this, FALSE);
2180 basic_string_wchar_assign_substr(this, assign, pos, len);
2181 return this;
2184 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBGABV?$allocator@G@1@@Z */
2185 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBGAEBV?$allocator@G@1@@Z */
2186 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_cstr_alloc, 12)
2187 basic_string_wchar* __thiscall basic_string_wchar_ctor_cstr_alloc(
2188 basic_string_wchar *this, const wchar_t *str, const void *alloc)
2190 TRACE("%p %s\n", this, debugstr_w(str));
2192 basic_string_wchar__Tidy(this, FALSE);
2193 basic_string_wchar_assign_cstr(this, str);
2194 return this;
2197 basic_string_wchar* basic_string_wchar_ctor_cstr(basic_string_wchar *this, const wchar_t *str)
2199 return basic_string_wchar_ctor_cstr_alloc(this, str, NULL);
2202 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@IGABV?$allocator@G@1@@Z */
2203 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@_KGAEBV?$allocator@G@1@@Z */
2204 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_ch_alloc, 16)
2205 basic_string_wchar* __thiscall basic_string_wchar_ctor_ch_alloc(basic_string_wchar *this,
2206 MSVCP_size_t count, wchar_t ch, const void *alloc)
2208 TRACE("%p %ld %c\n", this, count, ch);
2210 basic_string_wchar__Tidy(this, FALSE);
2211 basic_string_wchar_assignn(this, count, ch);
2212 return this;
2215 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBG0ABV?$allocator@G@1@@Z */
2216 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG0AEBV?$allocator@G@1@@Z */
2217 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_iter, 16)
2218 basic_string_wchar* __thiscall basic_string_wchar_ctor_iter(basic_string_wchar *this,
2219 const wchar_t *first, const wchar_t *last, allocator *alloc)
2221 TRACE("(%p %p %p %p)\n", this, first, last, alloc);
2223 basic_string_wchar__Tidy(this, FALSE);
2224 basic_string_wchar_assign_cstr_len(this, first, basic_string_wchar__Pdif(last, first));
2225 return this;
2228 /* ??_F?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
2229 /* ??_F?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
2230 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor, 4)
2231 basic_string_wchar* __thiscall basic_string_wchar_ctor(basic_string_wchar *this)
2233 TRACE("%p\n", this);
2235 basic_string_wchar__Tidy(this, FALSE);
2236 return this;
2239 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$allocator@G@1@@Z */
2240 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV?$allocator@G@1@@Z */
2241 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_alloc, 8)
2242 basic_string_wchar* __thiscall basic_string_wchar_ctor_alloc(
2243 basic_string_wchar *this, const void *alloc)
2245 TRACE("%p %p\n", this, alloc);
2247 basic_string_wchar__Tidy(this, FALSE);
2248 return this;
2251 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV01@@Z */
2252 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV01@@Z */
2253 DEFINE_THISCALL_WRAPPER(basic_string_wchar_copy_ctor, 8)
2254 basic_string_wchar* __thiscall basic_string_wchar_copy_ctor(
2255 basic_string_wchar *this, const basic_string_wchar *copy)
2257 TRACE("%p %p\n", this, copy);
2259 basic_string_wchar__Tidy(this, FALSE);
2260 basic_string_wchar_assign(this, copy);
2261 return this;
2264 /* ??1?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@XZ */
2265 /* ??1?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@XZ */
2266 DEFINE_THISCALL_WRAPPER(basic_string_wchar_dtor, 4)
2267 void __thiscall basic_string_wchar_dtor(basic_string_wchar *this)
2269 TRACE("%p\n", this);
2270 basic_string_wchar__Tidy(this, TRUE);
2273 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIPBGI@Z */
2274 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0PEBG0@Z */
2275 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr_cstr_len, 20)
2276 int __thiscall basic_string_wchar_compare_substr_cstr_len(
2277 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2278 const wchar_t *str, MSVCP_size_t count)
2280 int ans;
2282 TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_wn(str, count), count);
2284 if(this->size < pos)
2285 _Xran();
2287 if(num > this->size-pos)
2288 num = this->size-pos;
2290 ans = char_traits_wchar_compare(this->ptr+pos,
2291 str, num>count ? count : num);
2292 if(ans)
2293 return ans;
2295 if(num > count)
2296 ans = 1;
2297 else if(num < count)
2298 ans = -1;
2299 return ans;
2302 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHPBG@Z */
2303 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAHPEBG@Z */
2304 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_cstr, 8)
2305 int __thiscall basic_string_wchar_compare_cstr(
2306 const basic_string_wchar *this, const wchar_t *str)
2308 return basic_string_wchar_compare_substr_cstr_len(this, 0, this->size,
2309 str, char_traits_wchar_length(str));
2312 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIABV12@II@Z */
2313 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0AEBV12@00@Z */
2314 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr_substr, 24)
2315 int __thiscall basic_string_wchar_compare_substr_substr(
2316 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2317 const basic_string_wchar *compare, MSVCP_size_t off, MSVCP_size_t count)
2319 TRACE("%p %lu %lu %p %lu %lu\n", this, pos, num, compare, off, count);
2321 if(compare->size < off)
2322 _Xran();
2324 if(count > compare->size-off)
2325 count = compare->size-off;
2327 return basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2328 compare->ptr+off, count);
2331 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIABV12@@Z */
2332 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0AEBV12@@Z */
2333 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr, 16)
2334 int __thiscall basic_string_wchar_compare_substr(
2335 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2336 const basic_string_wchar *compare)
2338 return basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2339 compare->ptr, compare->size);
2342 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHABV12@@Z */
2343 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAHAEBV12@@Z */
2344 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare, 8)
2345 int __thiscall basic_string_wchar_compare(
2346 const basic_string_wchar *this, const basic_string_wchar *compare)
2348 return basic_string_wchar_compare_substr_cstr_len(this, 0, this->size,
2349 compare->ptr, compare->size);
2352 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIPBG@Z */
2353 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0PEBG@Z */
2354 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr_cstr, 16)
2355 int __thiscall basic_string_wchar_compare_substr_cstr(const basic_string_wchar *this,
2356 MSVCP_size_t pos, MSVCP_size_t num, const wchar_t *str)
2358 return basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2359 str, char_traits_wchar_length(str));
2362 /* ??$?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 */
2363 /* ??$?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 */
2364 /* ??8std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2365 /* ??8std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2366 MSVCP_bool __cdecl basic_string_wchar_equal(
2367 const basic_string_wchar *left, const basic_string_wchar *right)
2369 return basic_string_wchar_compare(left, right) == 0;
2372 /* ??$?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 */
2373 /* ??$?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 */
2374 /* ??8std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2375 /* ??8std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2376 MSVCP_bool __cdecl basic_string_wchar_equal_str_cstr(
2377 const basic_string_wchar *left, const wchar_t *right)
2379 return basic_string_wchar_compare_cstr(left, right) == 0;
2382 /* ??$?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 */
2383 /* ??$?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 */
2384 /* ??8std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2385 /* ??8std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2386 MSVCP_bool __cdecl basic_string_wchar_equal_cstr_str(
2387 const wchar_t *left, const basic_string_wchar *right)
2389 return basic_string_wchar_compare_cstr(right, left) == 0;
2392 /* ??$?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 */
2393 /* ??$?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 */
2394 /* ??9std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2395 /* ??9std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2396 MSVCP_bool __cdecl basic_string_wchar_not_equal(
2397 const basic_string_wchar *left, const basic_string_wchar *right)
2399 return basic_string_wchar_compare(left, right) != 0;
2402 /* ??$?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 */
2403 /* ??$?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 */
2404 /* ??9std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2405 /* ??9std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2406 MSVCP_bool __cdecl basic_string_wchar_not_equal_str_cstr(
2407 const basic_string_wchar *left, const wchar_t *right)
2409 return basic_string_wchar_compare_cstr(left, right) != 0;
2412 /* ??$?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 */
2413 /* ??$?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 */
2414 /* ??9std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2415 /* ??9std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2416 MSVCP_bool __cdecl basic_string_wchar_not_equal_cstr_str(
2417 const wchar_t *left, const basic_string_wchar *right)
2419 return basic_string_wchar_compare_cstr(right, left) != 0;
2422 /* ??$?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 */
2423 /* ??$?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 */
2424 /* ??Mstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2425 /* ??Mstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2426 MSVCP_bool __cdecl basic_string_wchar_lower(
2427 const basic_string_wchar *left, const basic_string_wchar *right)
2429 return basic_string_wchar_compare(left, right) < 0;
2432 /* ??$?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 */
2433 /* ??$?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 */
2434 /* ??Mstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2435 /* ??Mstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2436 MSVCP_bool __cdecl basic_string_wchar_lower_bstr_cstr(
2437 const basic_string_wchar *left, const wchar_t *right)
2439 return basic_string_wchar_compare_cstr(left, right) < 0;
2442 /* ??$?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 */
2443 /* ??$?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 */
2444 /* ??Mstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2445 /* ??Mstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2446 MSVCP_bool __cdecl basic_string_wchar_lower_cstr_bstr(
2447 const wchar_t *left, const basic_string_wchar *right)
2449 return basic_string_wchar_compare_cstr(right, left) > 0;
2452 /* ??$?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 */
2453 /* ??$?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 */
2454 /* ??Nstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2455 /* ??Nstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2456 MSVCP_bool __cdecl basic_string_wchar_leq(
2457 const basic_string_wchar *left, const basic_string_wchar *right)
2459 return basic_string_wchar_compare(left, right) <= 0;
2462 /* ??$?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 */
2463 /* ??$?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 */
2464 /* ??Nstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2465 /* ??Nstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2466 MSVCP_bool __cdecl basic_string_wchar_leq_bstr_cstr(
2467 const basic_string_wchar *left, const wchar_t *right)
2469 return basic_string_wchar_compare_cstr(left, right) <= 0;
2472 /* ??$?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 */
2473 /* ??$?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 */
2474 /* ??Nstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2475 /* ??Nstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2476 MSVCP_bool __cdecl basic_string_wchar_leq_cstr_bstr(
2477 const wchar_t *left, const basic_string_wchar *right)
2479 return basic_string_wchar_compare_cstr(right, left) >= 0;
2482 /* ??$?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 */
2483 /* ??$?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 */
2484 /* ??Ostd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2485 /* ??Ostd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2486 MSVCP_bool __cdecl basic_string_wchar_greater(
2487 const basic_string_wchar *left, const basic_string_wchar *right)
2489 return basic_string_wchar_compare(left, right) > 0;
2492 /* ??$?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 */
2493 /* ??$?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 */
2494 /* ??Ostd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2495 /* ??Ostd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2496 MSVCP_bool __cdecl basic_string_wchar_greater_bstr_cstr(
2497 const basic_string_wchar *left, const wchar_t *right)
2499 return basic_string_wchar_compare_cstr(left, right) > 0;
2502 /* ??$?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 */
2503 /* ??$?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 */
2504 /* ??Ostd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2505 /* ??Ostd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2506 MSVCP_bool __cdecl basic_string_wchar_greater_cstr_bstr(
2507 const wchar_t *left, const basic_string_wchar *right)
2509 return basic_string_wchar_compare_cstr(right, left) < 0;
2512 /* ??$?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 */
2513 /* ??$?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 */
2514 /* ??Pstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2515 /* ??Pstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2516 MSVCP_bool __cdecl basic_string_wchar_geq(
2517 const basic_string_wchar *left, const basic_string_wchar *right)
2519 return basic_string_wchar_compare(left, right) >= 0;
2522 /* ??$?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 */
2523 /* ??$?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 */
2524 /* ??Pstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2525 /* ??Pstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2526 MSVCP_bool __cdecl basic_string_wchar_geq_bstr_cstr(
2527 const basic_string_wchar *left, const wchar_t *right)
2529 return basic_string_wchar_compare_cstr(left, right) >= 0;
2532 /* ??$?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 */
2533 /* ??$?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 */
2534 /* ??Pstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2535 /* ??Pstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2536 MSVCP_bool __cdecl basic_string_wchar_geq_cstr_bstr(
2537 const wchar_t *left, const basic_string_wchar *right)
2539 return basic_string_wchar_compare_cstr(right, left) <= 0;
2542 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2543 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2544 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_cstr_substr, 16)
2545 MSVCP_size_t __thiscall basic_string_wchar_find_cstr_substr(
2546 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos, MSVCP_size_t len)
2548 const wchar_t *p, *end;
2550 TRACE("%p %s %lu %lu\n", this, debugstr_wn(find, len), pos, len);
2552 if(len==0 && pos<=this->size)
2553 return pos;
2554 if(pos>=this->size || len>this->size)
2555 return basic_string_wchar_npos;
2557 end = this->ptr+this->size-len+1;
2558 for(p=this->ptr+pos; p<end; p++) {
2559 p = char_traits_wchar_find(p, end-p, find);
2560 if(!p)
2561 break;
2563 if(!char_traits_wchar_compare(p, find, len))
2564 return p-this->ptr;
2567 return basic_string_wchar_npos;
2570 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2571 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2572 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_off, 12)
2573 MSVCP_size_t __thiscall basic_string_wchar_find_off(
2574 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2576 return basic_string_wchar_find_cstr_substr(this, find->ptr, off, find->size);
2579 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2580 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2581 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_ch, 12)
2582 MSVCP_size_t __thiscall basic_string_wchar_find_ch(
2583 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t pos)
2585 return basic_string_wchar_find_cstr_substr(this, &ch, pos, 1);
2588 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2589 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2590 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_cstr_off, 12)
2591 MSVCP_size_t __thiscall basic_string_wchar_find_cstr_off(
2592 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos)
2594 return basic_string_wchar_find_cstr_substr(this, find, pos,
2595 char_traits_wchar_length(find));
2598 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2599 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2600 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_cstr_substr, 16)
2601 MSVCP_size_t __thiscall basic_string_wchar_rfind_cstr_substr(
2602 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos, MSVCP_size_t len)
2604 const wchar_t *p, *end;
2606 TRACE("%p %s %lu %lu\n", this, debugstr_wn(find, len), pos, len);
2608 if(len==0)
2609 return pos<this->size ? pos : this->size;
2611 if(len > this->size)
2612 return basic_string_wchar_npos;
2614 if(pos > this->size-len+1)
2615 pos = this->size-len+1;
2616 end = this->ptr;
2617 for(p=end+pos; p>=end; p--) {
2618 if(*p==*find && !char_traits_wchar_compare(p, find, len))
2619 return p-this->ptr;
2622 return basic_string_wchar_npos;
2625 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2626 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2627 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_off, 12)
2628 MSVCP_size_t __thiscall basic_string_wchar_rfind_off(
2629 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2631 return basic_string_wchar_rfind_cstr_substr(this, find->ptr, off, find->size);
2634 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2635 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2636 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_ch, 12)
2637 MSVCP_size_t __thiscall basic_string_wchar_rfind_ch(
2638 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t pos)
2640 return basic_string_wchar_rfind_cstr_substr(this, &ch, pos, 1);
2643 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2644 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2645 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_cstr_off, 12)
2646 MSVCP_size_t __thiscall basic_string_wchar_rfind_cstr_off(
2647 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos)
2649 return basic_string_wchar_rfind_cstr_substr(this, find, pos,
2650 char_traits_wchar_length(find));
2653 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2654 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2655 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of_cstr_substr, 16)
2656 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of_cstr_substr(
2657 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2659 const wchar_t *p, *end;
2661 TRACE("%p %p %lu %lu\n", this, find, off, len);
2663 if(off<this->size) {
2664 end = this->ptr+this->size;
2665 for(p=this->ptr+off; p<end; p++)
2666 if(!char_traits_wchar_find(find, len, p))
2667 return p-this->ptr;
2670 return basic_string_wchar_npos;
2673 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2674 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2675 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of, 12)
2676 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of(
2677 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2679 return basic_string_wchar_find_first_not_of_cstr_substr(this,
2680 find->ptr, off, find->size);
2683 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2684 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2685 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of_ch, 12)
2686 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of_ch(
2687 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2689 return basic_string_wchar_find_first_not_of_cstr_substr(this, &ch, off, 1);
2692 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2693 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2694 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of_cstr, 12)
2695 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of_cstr(
2696 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2698 return basic_string_wchar_find_first_not_of_cstr_substr(
2699 this, find, off, char_traits_wchar_length(find));
2702 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2703 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2704 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of_cstr_substr, 16)
2705 MSVCP_size_t __thiscall basic_string_wchar_find_first_of_cstr_substr(
2706 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2708 const wchar_t *p, *end;
2710 TRACE("%p %p %lu %lu\n", this, find, off, len);
2712 if(len>0 && off<this->size) {
2713 end = this->ptr+this->size;
2714 for(p=this->ptr+off; p<end; p++)
2715 if(char_traits_wchar_find(find, len, p))
2716 return p-this->ptr;
2719 return basic_string_wchar_npos;
2722 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2723 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2724 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of, 12)
2725 MSVCP_size_t __thiscall basic_string_wchar_find_first_of(
2726 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2728 return basic_string_wchar_find_first_of_cstr_substr(this,
2729 find->ptr, off, find->size);
2732 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2733 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2734 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of_ch, 12)
2735 MSVCP_size_t __thiscall basic_string_wchar_find_first_of_ch(
2736 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2738 return basic_string_wchar_find_first_of_cstr_substr(this, &ch, off, 1);
2741 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2742 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2743 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of_cstr, 12)
2744 MSVCP_size_t __thiscall basic_string_wchar_find_first_of_cstr(
2745 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2747 return basic_string_wchar_find_first_of_cstr_substr(
2748 this, find, off, char_traits_wchar_length(find));
2751 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2752 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2753 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of_cstr_substr, 16)
2754 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of_cstr_substr(
2755 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2757 const wchar_t *p, *beg;
2759 TRACE("%p %p %lu %lu\n", this, find, off, len);
2761 if(len>0 && this->size>0) {
2762 if(off >= this->size)
2763 off = this->size-1;
2765 beg = this->ptr;
2766 for(p=beg+off; p>=beg; p--)
2767 if(!char_traits_wchar_find(find, len, p))
2768 return p-beg;
2771 return basic_string_wchar_npos;
2774 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2775 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2776 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of, 12)
2777 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of(
2778 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2780 return basic_string_wchar_find_last_not_of_cstr_substr(this,
2781 find->ptr, off, find->size);
2784 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2785 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2786 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of_ch, 12)
2787 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of_ch(
2788 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2790 return basic_string_wchar_find_last_not_of_cstr_substr(this, &ch, off, 1);
2793 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2794 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2795 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of_cstr, 12)
2796 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of_cstr(
2797 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2799 return basic_string_wchar_find_last_not_of_cstr_substr(
2800 this, find, off, char_traits_wchar_length(find));
2803 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2804 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2805 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of_cstr_substr, 16)
2806 MSVCP_size_t __thiscall basic_string_wchar_find_last_of_cstr_substr(
2807 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2809 const wchar_t *p, *beg;
2811 TRACE("%p %p %lu %lu\n", this, find, off, len);
2813 if(len>0 && this->size>0) {
2814 if(off >= this->size)
2815 off = this->size-1;
2817 beg = this->ptr;
2818 for(p=beg+off; p>=beg; p--)
2819 if(char_traits_wchar_find(find, len, p))
2820 return p-beg;
2823 return basic_string_wchar_npos;
2826 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2827 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2828 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of, 12)
2829 MSVCP_size_t __thiscall basic_string_wchar_find_last_of(
2830 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2832 return basic_string_wchar_find_last_of_cstr_substr(this,
2833 find->ptr, off, find->size);
2836 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2837 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2838 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of_ch, 12)
2839 MSVCP_size_t __thiscall basic_string_wchar_find_last_of_ch(
2840 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2842 return basic_string_wchar_find_last_of_cstr_substr(this, &ch, off, 1);
2845 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2846 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2847 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of_cstr, 12)
2848 MSVCP_size_t __thiscall basic_string_wchar_find_last_of_cstr(
2849 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2851 return basic_string_wchar_find_last_of_cstr_substr(
2852 this, find, off, char_traits_wchar_length(find));
2855 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@II@Z */
2856 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
2857 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_substr, 16)
2858 basic_string_wchar* __thiscall basic_string_wchar_append_substr(basic_string_wchar *this,
2859 const basic_string_wchar *append, MSVCP_size_t offset, MSVCP_size_t count)
2861 TRACE("%p %p %lu %lu\n", this, append, offset, count);
2863 if(append->size < offset)
2864 _Xran();
2866 if(count > append->size-offset)
2867 count = append->size-offset;
2869 if(basic_string_wchar_npos-this->size<=count || this->size+count<this->size)
2870 _Xlen();
2872 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2873 if(append->ptr)
2874 char_traits_wchar__Copy_s(this->ptr+this->size, this->res-this->size,
2875 append->ptr+offset, count);
2876 basic_string_wchar__Eos(this, this->size+count);
2879 return this;
2882 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBGI@Z */
2883 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG_K@Z */
2884 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_cstr_len, 12)
2885 basic_string_wchar* __thiscall basic_string_wchar_append_cstr_len(
2886 basic_string_wchar *this, const wchar_t *append, MSVCP_size_t count)
2888 TRACE("%p %s %lu\n", this, debugstr_wn(append, count), count);
2890 if(basic_string_wchar_inside(this, append))
2891 return basic_string_wchar_append_substr(this, this, append-this->ptr, count);
2893 if(basic_string_wchar_npos-this->size<=count || this->size+count<this->size)
2894 _Xlen();
2896 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2897 char_traits_wchar__Copy_s(this->ptr+this->size,
2898 this->res-this->size, append, count);
2899 basic_string_wchar__Eos(this, this->size+count);
2902 return this;
2905 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IG@Z */
2906 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KG@Z */
2907 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_len_ch, 12)
2908 basic_string_wchar* __thiscall basic_string_wchar_append_len_ch(
2909 basic_string_wchar *this, MSVCP_size_t count, wchar_t ch)
2911 TRACE("%p %lu %c\n", this, count, ch);
2913 if(basic_string_wchar_npos-this->size <= count)
2914 _Xlen();
2916 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2917 char_traits_wchar_assignn(this->ptr+this->size, count, ch);
2918 basic_string_wchar__Eos(this, this->size+count);
2921 return this;
2924 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@@Z */
2925 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@@Z */
2926 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@ABV01@@Z */
2927 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@AEBV01@@Z */
2928 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append, 8)
2929 basic_string_wchar* __thiscall basic_string_wchar_append(
2930 basic_string_wchar *this, const basic_string_wchar *append)
2932 return basic_string_wchar_append_substr(this, append,
2933 0, basic_string_wchar_npos);
2936 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@G@Z */
2937 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@G@Z */
2938 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_ch, 8)
2939 basic_string_wchar* __thiscall basic_string_wchar_append_ch(
2940 basic_string_wchar *this, wchar_t ch)
2942 return basic_string_wchar_append_len_ch(this, 1, ch);
2945 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG0@Z */
2946 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG0@Z */
2947 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_beg_end, 12)
2948 basic_string_wchar* __thiscall basic_string_wchar_append_beg_end(
2949 basic_string_wchar *this, const wchar_t *beg, const wchar_t *end)
2951 return basic_string_wchar_append_cstr_len(this, beg, end-beg);
2954 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG@Z */
2955 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG@Z */
2956 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@PBG@Z */
2957 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@PEBG@Z */
2958 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_cstr, 8)
2959 basic_string_wchar* __thiscall basic_string_wchar_append_cstr(
2960 basic_string_wchar *this, const wchar_t *append)
2962 return basic_string_wchar_append_cstr_len(this, append,
2963 char_traits_wchar_length(append));
2965 /* ??$?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 */
2966 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@0@Z */
2967 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@0@Z */
2968 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@0@Z */
2969 basic_string_wchar* __cdecl basic_string_wchar_concatenate(basic_string_wchar *ret,
2970 const basic_string_wchar *left, const basic_string_wchar *right)
2972 TRACE("%p %p\n", left, right);
2974 basic_string_wchar_copy_ctor(ret, left);
2975 basic_string_wchar_append(ret, right);
2976 return ret;
2979 /* ??$?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 */
2980 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@G@Z */
2981 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@G@Z */
2982 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@G@Z */
2983 basic_string_wchar* __cdecl basic_string_wchar_concatenate_bstr_ch(basic_string_wchar *ret,
2984 const basic_string_wchar *left, wchar_t right)
2986 TRACE("%p %c\n", left, right);
2988 basic_string_wchar_copy_ctor(ret, left);
2989 basic_string_wchar_append_ch(ret, right);
2990 return ret;
2993 /* ??$?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 */
2994 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@PEBG@Z */
2995 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@PBG@Z */
2996 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@PEBG@Z */
2997 basic_string_wchar* __cdecl basic_string_wchar_concatenate_bstr_cstr(basic_string_wchar *ret,
2998 const basic_string_wchar *left, const wchar_t *right)
3000 TRACE("%p %s\n", left, debugstr_w(right));
3002 basic_string_wchar_copy_ctor(ret, left);
3003 basic_string_wchar_append_cstr(ret, right);
3004 return ret;
3007 /* ??$?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 */
3008 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GAEBV10@@Z */
3009 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GABV10@@Z */
3010 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GAEBV10@@Z */
3011 basic_string_wchar* __cdecl basic_string_wchar_concatenate_ch_bstr(basic_string_wchar *ret,
3012 wchar_t left, const basic_string_wchar *right)
3014 TRACE("%c %p\n", left, right);
3016 basic_string_wchar_ctor_cstr_len_alloc(ret, &left, 1, NULL);
3017 basic_string_wchar_append(ret, right);
3018 return ret;
3021 /* ??$?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 */
3022 /* ??$?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 */
3023 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBGABV10@@Z */
3024 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBGAEBV10@@Z */
3025 basic_string_wchar* __cdecl basic_string_wchar_concatenate_cstr_bstr(basic_string_wchar *ret,
3026 const wchar_t *left, const basic_string_wchar *right)
3028 TRACE("%s %p\n", debugstr_w(left), right);
3030 basic_string_wchar_ctor_cstr_alloc(ret, left, NULL);
3031 basic_string_wchar_append(ret, right);
3032 return ret;
3035 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGI@Z */
3036 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAG_K@Z */
3037 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEABGI@Z */
3038 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAAEBG_K@Z */
3039 DEFINE_THISCALL_WRAPPER(basic_string_wchar_operator_at, 8)
3040 wchar_t* __thiscall basic_string_wchar_operator_at(
3041 basic_string_wchar *this, MSVCP_size_t pos)
3043 TRACE("%p %lu\n", this, pos);
3045 assert(this->size >= pos);
3046 return this->ptr+pos;
3049 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGI@Z */
3050 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAG_K@Z */
3051 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEABGI@Z */
3052 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAAEBG_K@Z */
3053 DEFINE_THISCALL_WRAPPER(basic_string_wchar_at, 8)
3054 wchar_t* __thiscall basic_string_wchar_at(
3055 basic_string_wchar *this, MSVCP_size_t pos)
3057 TRACE("%p %lu\n", this, pos);
3059 if(this->size <= pos)
3060 _Xran();
3062 return this->ptr+pos;
3065 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIPBGI@Z */
3066 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG0@Z */
3067 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_cstr_len, 20)
3068 basic_string_wchar* __thiscall basic_string_wchar_replace_cstr_len(basic_string_wchar *this,
3069 MSVCP_size_t off, MSVCP_size_t len, const wchar_t *str, MSVCP_size_t str_len)
3071 MSVCP_size_t inside_pos = -1;
3072 wchar_t *ptr = this->ptr;
3074 TRACE("%p %ld %ld %p %ld\n", this, off, len, str, str_len);
3076 if(this->size < off)
3077 _Xran();
3079 if(len > this->size-off)
3080 len = this->size-off;
3082 if(basic_string_wchar_npos-str_len <= this->size-len)
3083 _Xlen();
3085 if(basic_string_wchar_inside(this, str))
3086 inside_pos = str-ptr;
3088 if(this->size-len+str_len)
3089 basic_string_wchar__Grow(this, this->size-len+str_len, FALSE);
3090 ptr = this->ptr;
3092 if(inside_pos == -1) {
3093 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3094 memcpy(ptr+off, str, str_len*sizeof(char));
3095 } else if(len >= str_len) {
3096 memmove(ptr+off, ptr+inside_pos, str_len*sizeof(char));
3097 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3098 } else {
3099 MSVCP_size_t size;
3101 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3103 if(inside_pos < off+len) {
3104 size = off+len-inside_pos;
3105 if(size > str_len)
3106 size = str_len;
3107 memmove(ptr+off, ptr+inside_pos, size*sizeof(char));
3108 } else {
3109 size = 0;
3112 if(str_len > size)
3113 memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(char));
3116 if(this->ptr)
3117 basic_string_wchar__Eos(this, this->size-len+str_len);
3118 return this;
3121 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@II@Z */
3122 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0AEBV12@00@Z */
3123 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_substr, 24)
3124 basic_string_wchar* __thiscall basic_string_wchar_replace_substr(basic_string_wchar *this, MSVCP_size_t off,
3125 MSVCP_size_t len, const basic_string_wchar *str, MSVCP_size_t str_off, MSVCP_size_t str_len)
3127 if(str->size < str_off)
3128 _Xran();
3130 if(str_len > str->size-str_off)
3131 str_len = str->size-str_off;
3133 return basic_string_wchar_replace_cstr_len(this, off, len,
3134 str->ptr+str_off, str_len);
3137 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@@Z */
3138 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0AEBV12@@Z */
3139 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace, 16)
3140 basic_string_wchar* __thiscall basic_string_wchar_replace(basic_string_wchar *this,
3141 MSVCP_size_t off, MSVCP_size_t len, const basic_string_wchar *str)
3143 return basic_string_wchar_replace_cstr_len(this, off, len,
3144 str->ptr, str->size);
3147 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIIG@Z */
3148 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K00G@Z */
3149 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_ch, 20)
3150 basic_string_wchar* __thiscall basic_string_wchar_replace_ch(basic_string_wchar *this,
3151 MSVCP_size_t off, MSVCP_size_t len, MSVCP_size_t count, wchar_t ch)
3153 wchar_t *ptr;
3155 TRACE("%p %ld %ld %ld %c\n", this, off, len, count, ch);
3157 if(this->size < off)
3158 _Xran();
3160 if(len > this->size-off)
3161 len = this->size-off;
3163 if(basic_string_wchar_npos-count <= this->size-len)
3164 _Xlen();
3166 if(this->size-len+count)
3167 basic_string_wchar__Grow(this, this->size-len+count, FALSE);
3168 ptr = this->ptr;
3170 memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(char));
3171 char_traits_wchar_assignn(ptr+off, count, ch);
3172 basic_string_wchar__Eos(this, this->size-len+count);
3174 return this;
3177 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIPBG@Z */
3178 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG@Z */
3179 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_cstr, 16)
3180 basic_string_wchar* __thiscall basic_string_wchar_replace_cstr(basic_string_wchar *this,
3181 MSVCP_size_t off, MSVCP_size_t len, const wchar_t *str)
3183 return basic_string_wchar_replace_cstr_len(this, off, len, str,
3184 char_traits_wchar_length(str));
3187 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0ABV12@@Z */
3188 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0AEBV12@@Z */
3189 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_bstr, 16)
3190 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_bstr(basic_string_wchar *this,
3191 wchar_t *beg, wchar_t *end, const basic_string_wchar *str)
3193 return basic_string_wchar_replace(this, basic_string_wchar__Pdif(beg, this->ptr),
3194 basic_string_wchar__Pdif(end, beg), str);
3197 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0IG@Z */
3198 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0_KG@Z */
3199 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_chn, 20)
3200 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_chn(basic_string_wchar *this,
3201 wchar_t *beg, wchar_t *end, MSVCP_size_t count, wchar_t ch)
3203 return basic_string_wchar_replace_ch(this, basic_string_wchar__Pdif(beg, this->ptr),
3204 basic_string_wchar__Pdif(end, beg), count, ch);
3207 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBG1@Z */
3208 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG1@Z */
3209 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_iter, 20)
3210 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_iter(basic_string_wchar *this,
3211 wchar_t *beg1, wchar_t *end1, const wchar_t *beg2, const wchar_t *end2)
3213 return basic_string_wchar_replace_cstr_len(this, basic_string_wchar__Pdif(beg1, this->ptr),
3214 basic_string_wchar__Pdif(end1, beg1), beg2, basic_string_wchar__Pdif(end2, beg2));
3217 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBG@Z */
3218 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG@Z */
3219 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr, 16)
3220 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr(basic_string_wchar *this,
3221 wchar_t *beg, wchar_t *end, const wchar_t *str)
3223 return basic_string_wchar_replace_cstr(this, basic_string_wchar__Pdif(beg, this->ptr),
3224 basic_string_wchar__Pdif(end, beg), str);
3227 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBGI@Z */
3228 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG_K@Z */
3229 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr_len, 20)
3230 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr_len(basic_string_wchar *this,
3231 wchar_t *beg, wchar_t *end, const wchar_t *str, MSVCP_size_t len)
3233 return basic_string_wchar_replace_cstr_len(this, basic_string_wchar__Pdif(beg, this->ptr),
3234 basic_string_wchar__Pdif(end, beg), str, len);
3237 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IABV12@@Z */
3238 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KAEBV12@@Z */
3239 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert, 12)
3240 basic_string_wchar* __thiscall basic_string_wchar_insert(basic_string_wchar *this,
3241 MSVCP_size_t off, const basic_string_wchar *str)
3243 return basic_string_wchar_replace(this, off, 0, str);
3246 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IABV12@II@Z */
3247 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KAEBV12@00@Z */
3248 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_substr, 20)
3249 basic_string_wchar* __thiscall basic_string_wchar_insert_substr(
3250 basic_string_wchar *this, MSVCP_size_t off, const basic_string_wchar *str,
3251 MSVCP_size_t str_off, MSVCP_size_t str_count)
3253 return basic_string_wchar_replace_substr(this, off, 0, str, str_off, str_count);
3256 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IPBG@Z */
3257 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KPEBG@Z */
3258 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_cstr, 12)
3259 basic_string_wchar* __thiscall basic_string_wchar_insert_cstr(
3260 basic_string_wchar *this, MSVCP_size_t off, const wchar_t *str)
3262 return basic_string_wchar_replace_cstr(this, off, 0, str);
3265 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IPBGI@Z */
3266 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KPEBG0@Z */
3267 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_cstr_len, 16)
3268 basic_string_wchar* __thiscall basic_string_wchar_insert_cstr_len(basic_string_wchar *this,
3269 MSVCP_size_t off, const wchar_t *str, MSVCP_size_t str_len)
3271 return basic_string_wchar_replace_cstr_len(this, off, 0, str, str_len);
3274 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIG@Z */
3275 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0G@Z */
3276 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_chn, 16)
3277 basic_string_wchar* __thiscall basic_string_wchar_insert_chn(basic_string_wchar *this,
3278 MSVCP_size_t off, MSVCP_size_t count, wchar_t ch)
3280 return basic_string_wchar_replace_ch(this, off, 0, count, ch);
3283 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAGG@Z */
3284 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAGG@Z */
3285 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter_ch, 12)
3286 wchar_t* __thiscall basic_string_wchar_insert_iter_ch(basic_string_wchar *this, wchar_t *pos, wchar_t ch)
3288 MSVCP_size_t off = basic_string_wchar__Pdif(pos, this->ptr);
3289 basic_string_wchar_insert_chn(this, off, 1, ch);
3290 return basic_string_wchar__Psum(this->ptr, off);
3293 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXPAGIG@Z */
3294 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXPEAG_KG@Z */
3295 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter_chn, 16)
3296 void __thiscall basic_string_wchar_insert_iter_chn(basic_string_wchar *this,
3297 wchar_t *pos, MSVCP_size_t n, wchar_t ch)
3299 basic_string_wchar_insert_chn(this, basic_string_wchar__Pdif(pos, this->ptr), n, ch);
3302 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXPAGPBG1@Z */
3303 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXPEAGPEBG1@Z */
3304 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter, 16)
3305 void __thiscall basic_string_wchar_insert_iter(basic_string_wchar *this,
3306 wchar_t *pos, const wchar_t *beg, const wchar_t *end)
3308 basic_string_wchar_insert_cstr_len(this, basic_string_wchar__Pdif(pos, this->ptr),
3309 beg, basic_string_wchar__Pdif(end, beg));
3312 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXIG@Z */
3313 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_KG@Z */
3314 DEFINE_THISCALL_WRAPPER(basic_string_wchar_resize_ch, 12)
3315 void __thiscall basic_string_wchar_resize_ch(
3316 basic_string_wchar *this, MSVCP_size_t size, wchar_t ch)
3318 TRACE("%p %lu %c\n", this, size, ch);
3320 if(size <= this->size)
3321 basic_string_wchar_erase(this, size, this->size);
3322 else
3323 basic_string_wchar_append_len_ch(this, size-this->size, ch);
3326 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXI@Z */
3327 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_K@Z */
3328 DEFINE_THISCALL_WRAPPER(basic_string_wchar_resize, 8)
3329 void __thiscall basic_string_wchar_resize(
3330 basic_string_wchar *this, MSVCP_size_t size)
3332 basic_string_wchar_resize_ch(this, size, '\0');
3335 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGXZ */
3336 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGXZ */
3337 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3338 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3339 DEFINE_THISCALL_WRAPPER(basic_string_wchar_begin, 4)
3340 wchar_t* __thiscall basic_string_wchar_begin(basic_string_wchar *this)
3342 TRACE("(%p)\n", this);
3343 basic_string_wchar__Freeze(this);
3344 return this->ptr;
3347 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGXZ */
3348 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGXZ */
3349 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3350 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3351 DEFINE_THISCALL_WRAPPER(basic_string_wchar_end, 4)
3352 wchar_t* __thiscall basic_string_wchar_end(basic_string_wchar *this)
3354 TRACE("(%p)\n", this);
3355 basic_string_wchar__Freeze(this);
3356 return this->ptr+this->size;
3359 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@PAGGAAGPAGH@2@XZ */
3360 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@PEAGGAEAGPEAG_J@2@XZ */
3361 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@PBGGABGPBGH@2@XZ */
3362 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@PEBGGAEBGPEBG_J@2@XZ */
3363 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rbegin, 8)
3364 String_reverse_iterator_wchar* __thiscall basic_string_wchar_rbegin(
3365 basic_string_wchar *this, String_reverse_iterator_wchar *ret)
3367 TRACE("(%p %p)\n", this, ret);
3368 ret->ptr = basic_string_wchar_end(this);
3369 return ret;
3372 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@PAGGAAGPAGH@2@XZ */
3373 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@PEAGGAEAGPEAG_J@2@XZ */
3374 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@PBGGABGPBGH@2@XZ */
3375 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@PEBGGAEBGPEBG_J@2@XZ */
3376 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rend, 8)
3377 String_reverse_iterator_wchar* __thiscall basic_string_wchar_rend(
3378 basic_string_wchar *this, String_reverse_iterator_wchar *ret)
3380 TRACE("(%p %p)\n", this, ret);
3381 ret->ptr = basic_string_wchar_begin(this);
3382 return ret;
3385 /* ?c_str@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3386 /* ?c_str@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3387 /* ?data@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3388 /* ?data@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3389 DEFINE_THISCALL_WRAPPER(basic_string_wchar_c_str, 4)
3390 const wchar_t* __thiscall basic_string_wchar_c_str(const basic_string_wchar *this)
3392 TRACE("%p\n", this);
3393 return this->ptr ? this->ptr : basic_string_wchar__Nullstr();
3396 /* ?size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3397 /* ?size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3398 /* ?length@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3399 /* ?length@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3400 DEFINE_THISCALL_WRAPPER(basic_string_wchar_length, 4)
3401 MSVCP_size_t __thiscall basic_string_wchar_length(const basic_string_wchar *this)
3403 TRACE("%p\n", this);
3404 return this->size;
3407 /* ?max_size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3408 /* ?max_size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3409 DEFINE_THISCALL_WRAPPER(basic_string_wchar_max_size, 4)
3410 MSVCP_size_t __thiscall basic_string_wchar_max_size(const basic_string_wchar *this)
3412 TRACE("%p\n", this);
3413 return MSVCP_allocator_wchar_max_size(NULL)-1;
3416 /* ?capacity@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3417 /* ?capacity@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3418 DEFINE_THISCALL_WRAPPER(basic_string_wchar_capacity, 4)
3419 MSVCP_size_t __thiscall basic_string_wchar_capacity(basic_string_wchar *this)
3421 TRACE("%p\n", this);
3422 return this->res;
3425 /* ?reserve@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXI@Z */
3426 /* ?reserve@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_K@Z */
3427 DEFINE_THISCALL_WRAPPER(basic_string_wchar_reserve, 8)
3428 void __thiscall basic_string_wchar_reserve(basic_string_wchar *this, MSVCP_size_t size)
3430 MSVCP_size_t len;
3432 TRACE("%p %ld\n", this, size);
3434 len = this->size;
3435 if(len > size)
3436 return;
3438 if(basic_string_wchar__Grow(this, size, FALSE))
3439 basic_string_wchar__Eos(this, len);
3442 /* ?empty@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE_NXZ */
3443 /* ?empty@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_NXZ */
3444 DEFINE_THISCALL_WRAPPER(basic_string_wchar_empty, 4)
3445 MSVCP_bool __thiscall basic_string_wchar_empty(basic_string_wchar *this)
3447 TRACE("%p\n", this);
3448 return this->size == 0;
3451 /* ?swap@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXAAV12@@Z */
3452 /* ?swap@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXAEAV12@@Z */
3453 DEFINE_THISCALL_WRAPPER(basic_string_wchar_swap, 8)
3454 void __thiscall basic_string_wchar_swap(basic_string_wchar *this, basic_string_wchar *str)
3456 basic_string_wchar tmp;
3457 TRACE("%p %p\n", this, str);
3459 tmp = *this;
3460 *this = *str;
3461 *str = tmp;
3464 /* ?substr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV12@II@Z */
3465 /* ?substr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV12@_K0@Z */
3466 DEFINE_THISCALL_WRAPPER(basic_string_wchar_substr, 16)
3467 basic_string_wchar* __thiscall basic_string_wchar_substr(basic_string_wchar *this,
3468 basic_string_wchar *ret, MSVCP_size_t off, MSVCP_size_t len)
3470 TRACE("%p %lu %lu\n", this, off, len);
3472 basic_string_wchar_ctor_substr_alloc(ret, this, off, len, NULL);
3473 return ret;
3476 /* ?copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPAGII@Z */
3477 /* ?copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEAG_K1@Z */
3478 DEFINE_THISCALL_WRAPPER(basic_string_wchar_copy, 16)
3479 MSVCP_size_t __thiscall basic_string_wchar_copy(const basic_string_wchar *this,
3480 wchar_t *dest, MSVCP_size_t count, MSVCP_size_t off)
3482 TRACE("%p %p %lu %lu\n", this, dest, count, off);
3484 if(off > this->size)
3485 _Xran();
3486 if(count > this->size-off)
3487 count = this->size-off;
3488 if(this->ptr)
3489 char_traits_wchar__Copy_s(dest, count, this->ptr+off, count);
3490 return count;
3493 /* ?get_allocator@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$allocator@G@2@XZ */
3494 /* ?get_allocator@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$allocator@G@2@XZ */
3495 DEFINE_THISCALL_WRAPPER(basic_string_wchar_get_allocator, 8)
3496 allocator* __thiscall basic_string_wchar_get_allocator(const basic_string_wchar *this, allocator *ret)
3498 TRACE("%p\n", this);
3499 return ret;