comctl32: Never release state image list.
[wine/multimedia.git] / dlls / msvcp60 / string.c
blob96e7134908525d432d83424b24f9741e354be462
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(msvcp90);
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) ? FALSE : TRUE;
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 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEX_N@Z */
155 /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAX_N@Z */
156 DEFINE_THISCALL_WRAPPER(basic_string_char__Tidy, 8)
157 void __thiscall basic_string_char__Tidy(basic_string_char *this, MSVCP_bool built)
159 TRACE("(%p %d)\n", this, built);
161 if(!this->ptr || !built);
162 else if(!this->ptr[-1] || (unsigned char)this->ptr[-1]==FROZEN)
163 MSVCP_allocator_char_deallocate(NULL, this->ptr, this->res+2);
164 else
165 this->ptr[-1]--;
167 memset(this, 0, sizeof(*this));
170 /* ?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAE_NI_N@Z */
171 /* ?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAA_N_K_N@Z */
172 DEFINE_THISCALL_WRAPPER(basic_string_char__Grow, 12)
173 MSVCP_bool __thiscall basic_string_char__Grow(basic_string_char *this, MSVCP_size_t new_size, MSVCP_bool trim)
175 if(!new_size) {
176 if(trim)
177 basic_string_char__Tidy(this, TRUE);
178 else if(this->ptr)
179 basic_string_char__Eos(this, 0);
180 } else if(this->res<new_size || trim ||
181 (this->ptr && this->ptr[-1] && (unsigned char)this->ptr[-1]!=FROZEN)) {
182 MSVCP_size_t new_res = new_size, len = this->size;
183 char *ptr;
185 if(!trim && this->ptr && !this->ptr[-1]) {
186 new_res |= 0xf;
187 if(new_res/3 < this->res/2)
188 new_res = this->res + this->res/2;
191 ptr = MSVCP_allocator_char_allocate(this->allocator, new_res+2);
192 if(!ptr) {
193 new_res = new_size;
194 ptr = MSVCP_allocator_char_allocate(this->allocator, new_size+2);
196 if(!ptr) {
197 ERR("Out of memory\n");
198 return FALSE;
201 *ptr = 0;
202 if(this->ptr)
203 char_traits_char__Copy_s(ptr+1, new_size, this->ptr, this->size);
204 basic_string_char__Tidy(this, TRUE);
205 this->ptr = ptr+1;
206 this->res = new_res;
207 basic_string_char__Eos(this, len>new_res ? new_res : len);
210 return new_size>0;
213 /* ?_Split@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXXZ */
214 /* ?_Split@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAXXZ */
215 DEFINE_THISCALL_WRAPPER(basic_string_char__Split, 4)
216 void __thiscall basic_string_char__Split(basic_string_char *this)
218 MSVCP_size_t len;
219 char *ptr;
221 TRACE("(%p)\n", this);
223 if(!this->ptr || !this->ptr[-1] || (unsigned char)this->ptr[-1]==FROZEN)
224 return;
226 ptr = this->ptr;
227 len = this->size;
228 basic_string_char__Tidy(this, TRUE);
229 if(basic_string_char__Grow(this, len, FALSE)) {
230 char_traits_char__Copy_s(this->ptr, this->res, ptr, len);
231 basic_string_char__Eos(this, len);
235 /* ?_Freeze@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXXZ */
236 /* ?_Freeze@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAXXZ */
237 DEFINE_THISCALL_WRAPPER(basic_string_char__Freeze, 4)
238 void __thiscall basic_string_char__Freeze(basic_string_char *this)
240 TRACE("(%p)\n", this);
241 basic_string_char__Split(this);
242 if(this->ptr)
243 this->ptr[-1] = FROZEN;
246 /* ?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEXI@Z */
247 /* ?_Copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAX_K@Z */
248 DEFINE_THISCALL_WRAPPER(basic_string_char__Copy, 8)
249 void __thiscall basic_string_char__Copy(basic_string_char *this, MSVCP_size_t copy_len)
251 TRACE("%p %lu\n", this, copy_len);
253 if(!basic_string_char__Grow(this, copy_len, FALSE))
254 return;
255 basic_string_char__Eos(this, copy_len);
258 /* ?_Pdif@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAIPBD0@Z */
259 /* ?_Pdif@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CA_KPEBD0@Z */
260 MSVCP_size_t __cdecl basic_string_char__Pdif(const char *i1, const char *i2)
262 TRACE("(%p %p)\n", i1, i2);
263 return !i1 ? 0 : i1-i2;
266 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPADPADI@Z */
267 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEADPEAD_K@Z */
268 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPBDPBDI@Z */
269 /* ?_Psum@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@CAPEBDPEBD_K@Z */
270 char* __cdecl basic_string_char__Psum(char *iter, MSVCP_size_t add)
272 TRACE("(%p %lu)\n", iter, add);
273 return iter ? iter+add : iter;
276 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z */
277 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0@Z */
278 DEFINE_THISCALL_WRAPPER(basic_string_char_erase, 12)
279 basic_string_char* __thiscall basic_string_char_erase(
280 basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t len)
282 TRACE("%p %lu %lu\n", this, pos, len);
284 if(pos > this->size)
285 _Xran();
287 if(len > this->size-pos)
288 len = this->size-pos;
290 if(len) {
291 basic_string_char__Split(this);
292 char_traits_char__Move_s(this->ptr+pos, this->res-pos,
293 this->ptr+pos+len, this->size-pos-len);
294 basic_string_char__Eos(this, this->size-len);
297 return this;
300 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPAD0@Z */
301 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEAD0@Z */
302 DEFINE_THISCALL_WRAPPER(basic_string_char_erase_iter, 12)
303 char* __thiscall basic_string_char_erase_iter(basic_string_char *this, char *beg, char *end)
305 MSVCP_size_t pos = basic_string_char__Pdif(beg, this->ptr);
306 basic_string_char_erase(this, pos, basic_string_char__Pdif(end, beg));
307 return basic_string_char__Psum(this->ptr, pos);
310 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPAD@Z */
311 /* ?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEAD@Z */
312 DEFINE_THISCALL_WRAPPER(basic_string_char_erase_beg, 8)
313 char* __thiscall basic_string_char_erase_beg(basic_string_char *this, char *beg)
315 MSVCP_size_t pos = beg-this->ptr;
316 basic_string_char_erase(this, pos, 1);
317 return this->ptr+pos;
320 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */
321 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
322 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_substr, 16)
323 basic_string_char* __thiscall basic_string_char_assign_substr(
324 basic_string_char *this, const basic_string_char *assign,
325 MSVCP_size_t pos, MSVCP_size_t len)
327 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
329 if(assign->size < pos)
330 _Xran();
332 if(len > assign->size-pos)
333 len = assign->size-pos;
335 if(this == assign) {
336 basic_string_char_erase(this, pos+len, basic_string_char_npos);
337 basic_string_char_erase(this, 0, pos);
338 } else if(basic_string_char__Grow(this, len, FALSE)) {
339 char_traits_char__Copy_s(this->ptr, this->res,
340 assign->ptr+pos, len);
341 basic_string_char__Eos(this, len);
344 return this;
347 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z */
348 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z */
349 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_cstr_len, 12)
350 basic_string_char* __thiscall basic_string_char_assign_cstr_len(
351 basic_string_char *this, const char *str, MSVCP_size_t len)
353 TRACE("%p %s %lu\n", this, debugstr_a(str), len);
355 if(basic_string_char_inside(this, str))
356 return basic_string_char_assign_substr(this, this, str-this->ptr, len);
357 else if(basic_string_char__Grow(this, len, FALSE)) {
358 char_traits_char__Copy_s(this->ptr, this->res, str, len);
359 basic_string_char__Eos(this, len);
362 return this;
365 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */
366 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */
367 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z */
368 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@AEBV01@@Z */
369 DEFINE_THISCALL_WRAPPER(basic_string_char_assign, 8)
370 basic_string_char* __thiscall basic_string_char_assign(
371 basic_string_char *this, const basic_string_char *assign)
373 return basic_string_char_assign_substr(this, assign,
374 0, basic_string_char_npos);
377 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z */
378 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD@Z */
379 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z */
380 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@PEBD@Z */
381 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_cstr, 8)
382 basic_string_char* __thiscall basic_string_char_assign_cstr(
383 basic_string_char *this, const char *str)
385 return basic_string_char_assign_cstr_len(this, str,
386 char_traits_char_length(str));
389 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@D@Z */
390 /* ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@D@Z */
391 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_ch, 8)
392 basic_string_char* __thiscall basic_string_char_assign_ch(
393 basic_string_char *this, char ch)
395 return basic_string_char_assign_cstr_len(this, &ch, 1);
398 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */
399 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KD@Z */
400 DEFINE_THISCALL_WRAPPER(basic_string_char_assignn, 12)
401 basic_string_char* __thiscall basic_string_char_assignn(
402 basic_string_char *this, MSVCP_size_t count, char ch)
404 TRACE("%p %ld %c\n", this, count, ch);
406 basic_string_char__Grow(this, count, FALSE);
407 char_traits_char_assignn(this->ptr, count, ch);
408 basic_string_char__Eos(this, count);
409 return this;
412 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD0@Z */
413 /* ?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD0@Z */
414 DEFINE_THISCALL_WRAPPER(basic_string_char_assign_ptr_ptr, 12)
415 basic_string_char* __thiscall basic_string_char_assign_ptr_ptr(
416 basic_string_char *this, const char *first, const char *last)
418 return basic_string_char_assign_cstr_len(this, first, last-first);
421 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDIABV?$allocator@D@1@@Z */
422 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD_KAEBV?$allocator@D@1@@Z */
423 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_cstr_len_alloc, 16)
424 basic_string_char* __thiscall basic_string_char_ctor_cstr_len_alloc(
425 basic_string_char *this, const char *str, MSVCP_size_t len, const void *alloc)
427 TRACE("%p %s %ld\n", this, debugstr_a(str), len);
429 basic_string_char__Tidy(this, FALSE);
430 basic_string_char_assign_cstr_len(this, str, len);
431 return this;
434 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@IIABV?$allocator@D@1@@Z */
435 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@_K1AEBV?$allocator@D@1@@Z */
436 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_substr_alloc, 20)
437 basic_string_char* __thiscall basic_string_char_ctor_substr_alloc(
438 basic_string_char *this, const basic_string_char *assign,
439 MSVCP_size_t pos, MSVCP_size_t len, const void *alloc)
441 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
443 basic_string_char__Tidy(this, FALSE);
444 basic_string_char_assign_substr(this, assign, pos, len);
445 return this;
448 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDABV?$allocator@D@1@@Z */
449 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBDAEBV?$allocator@D@1@@Z */
450 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_cstr_alloc, 12)
451 basic_string_char* __thiscall basic_string_char_ctor_cstr_alloc(
452 basic_string_char *this, const char *str, const void *alloc)
454 TRACE("%p %s\n", this, debugstr_a(str));
456 basic_string_char__Tidy(this, FALSE);
457 basic_string_char_assign_cstr(this, str);
458 return this;
461 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr(
462 basic_string_char *this, const char *str)
464 return basic_string_char_ctor_cstr_alloc(this, str, NULL);
467 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@IDABV?$allocator@D@1@@Z */
468 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@_KDAEBV?$allocator@D@1@@Z */
469 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_ch_alloc, 16)
470 basic_string_char* __thiscall basic_string_char_ctor_ch_alloc(basic_string_char *this,
471 MSVCP_size_t count, char ch, const void *alloc)
473 TRACE("%p %ld %c\n", this, count, ch);
475 basic_string_char__Tidy(this, FALSE);
476 basic_string_char_assignn(this, count, ch);
477 return this;
480 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD0ABV?$allocator@D@1@@Z */
481 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@PEBD0AEBV?$allocator@D@1@@Z */
482 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_iter, 16)
483 basic_string_char* __thiscall basic_string_char_ctor_iter(basic_string_char *this,
484 const char *first, const char *last, allocator *alloc)
486 TRACE("(%p %p %p %p)\n", this, first, last, alloc);
488 basic_string_char__Tidy(this, FALSE);
489 basic_string_char_assign_cstr_len(this, first, basic_string_char__Pdif(last, first));
490 return this;
493 /* ??_F?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
494 /* ??_F?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
495 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor, 4)
496 basic_string_char* __thiscall basic_string_char_ctor(basic_string_char *this)
498 TRACE("%p\n", this);
500 basic_string_char__Tidy(this, FALSE);
501 return this;
504 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$allocator@D@1@@Z */
505 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV?$allocator@D@1@@Z */
506 DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_alloc, 8)
507 basic_string_char* __thiscall basic_string_char_ctor_alloc(
508 basic_string_char *this, const void *alloc)
510 TRACE("%p %p\n", this, alloc);
512 basic_string_char__Tidy(this, FALSE);
513 return this;
516 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z */
517 /* ??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV01@@Z */
518 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_copy_ctor, 8)
519 basic_string_char* __thiscall MSVCP_basic_string_char_copy_ctor(
520 basic_string_char *this, const basic_string_char *copy)
522 TRACE("%p %p\n", this, copy);
524 basic_string_char__Tidy(this, FALSE);
525 basic_string_char_assign(this, copy);
526 return this;
529 /* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ */
530 /* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@XZ */
531 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_dtor, 4)
532 void __thiscall MSVCP_basic_string_char_dtor(basic_string_char *this)
534 TRACE("%p\n", this);
535 basic_string_char__Tidy(this, TRUE);
538 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIPBDI@Z */
539 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0PEBD0@Z */
540 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_substr_cstr_len, 20)
541 int __thiscall basic_string_char_compare_substr_cstr_len(
542 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
543 const char *str, MSVCP_size_t count)
545 int ans;
547 TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_a(str), count);
549 if(this->size < pos)
550 _Xran();
552 if(pos+num > this->size)
553 num = this->size-pos;
555 ans = char_traits_char_compare(this->ptr+pos,
556 str, num>count ? count : num);
557 if(ans)
558 return ans;
560 if(num > count)
561 ans = 1;
562 else if(num < count)
563 ans = -1;
564 return ans;
567 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHPBD@Z */
568 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAHPEBD@Z */
569 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_cstr, 8)
570 int __thiscall basic_string_char_compare_cstr(
571 const basic_string_char *this, const char *str)
573 return basic_string_char_compare_substr_cstr_len(this, 0, this->size,
574 str, char_traits_char_length(str));
577 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIABV12@II@Z */
578 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0AEBV12@00@Z */
579 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_substr_substr, 24)
580 int __thiscall basic_string_char_compare_substr_substr(
581 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
582 const basic_string_char *compare, MSVCP_size_t off, MSVCP_size_t count)
584 TRACE("%p %lu %lu %p %lu %lu\n", this, pos, num, compare, off, count);
586 if(compare->size < off)
587 _Xran();
589 if(off+count > compare->size)
590 count = compare->size-off;
592 return basic_string_char_compare_substr_cstr_len(this, pos, num,
593 compare->ptr+off, count);
596 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIABV12@@Z */
597 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0AEBV12@@Z */
598 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_substr, 16)
599 int __thiscall basic_string_char_compare_substr(
600 const basic_string_char *this, MSVCP_size_t pos, MSVCP_size_t num,
601 const basic_string_char *compare)
603 return basic_string_char_compare_substr_cstr_len(this, pos, num,
604 compare->ptr, compare->size);
607 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHABV12@@Z */
608 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAHAEBV12@@Z */
609 DEFINE_THISCALL_WRAPPER(basic_string_char_compare, 8)
610 int __thiscall basic_string_char_compare(
611 const basic_string_char *this, const basic_string_char *compare)
613 return basic_string_char_compare_substr_cstr_len(this, 0, this->size,
614 compare->ptr, compare->size);
617 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHIIPBD@Z */
618 /* ?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAH_K0PEBD@Z */
619 DEFINE_THISCALL_WRAPPER(basic_string_char_compare_substr_cstr, 16)
620 int __thiscall basic_string_char_compare_substr_cstr(const basic_string_char *this,
621 MSVCP_size_t pos, MSVCP_size_t num, const char *str)
623 return basic_string_char_compare_substr_cstr_len(this, pos, num,
624 str, char_traits_char_length(str));
627 /* ??$?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 */
628 /* ??$?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 */
629 /* ??8std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
630 /* ??8std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
631 MSVCP_bool __cdecl basic_string_char_equal(
632 const basic_string_char *left, const basic_string_char *right)
634 return basic_string_char_compare(left, right) == 0;
637 /* ??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
638 /* ??$?8DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
639 /* ??8std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
640 /* ??8std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
641 MSVCP_bool __cdecl basic_string_char_equal_str_cstr(
642 const basic_string_char *left, const char *right)
644 return basic_string_char_compare_cstr(left, right) == 0;
647 /* ??$?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 */
648 /* ??$?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 */
649 /* ??8std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
650 /* ??8std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
651 MSVCP_bool __cdecl basic_string_char_equal_cstr_str(
652 const char *left, const basic_string_char *right)
654 return basic_string_char_compare_cstr(right, left) == 0;
657 /* ??$?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 */
658 /* ??$?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 */
659 /* ??9std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
660 /* ??9std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
661 MSVCP_bool __cdecl basic_string_char_not_equal(
662 const basic_string_char *left, const basic_string_char *right)
664 return basic_string_char_compare(left, right) != 0;
667 /* ??$?9DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
668 /* ??$?9DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
669 /* ??9std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
670 /* ??9std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
671 MSVCP_bool __cdecl basic_string_char_not_equal_str_cstr(
672 const basic_string_char *left, const char *right)
674 return basic_string_char_compare_cstr(left, right) != 0;
677 /* ??$?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 */
678 /* ??$?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 */
679 /* ??9std@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
680 /* ??9std@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
681 MSVCP_bool __cdecl basic_string_char_not_equal_cstr_str(
682 const char *left, const basic_string_char *right)
684 return basic_string_char_compare_cstr(right, left) != 0;
687 /* ??$?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 */
688 /* ??$?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 */
689 /* ??Mstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
690 /* ??Mstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
691 MSVCP_bool __cdecl basic_string_char_lower(
692 const basic_string_char *left, const basic_string_char *right)
694 return basic_string_char_compare(left, right) < 0;
697 /* ??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
698 /* ??$?MDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
699 /* ??Mstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
700 /* ??Mstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
701 MSVCP_bool __cdecl basic_string_char_lower_bstr_cstr(
702 const basic_string_char *left, const char *right)
704 return basic_string_char_compare_cstr(left, right) < 0;
707 /* ??$?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 */
708 /* ??$?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 */
709 /* ??Mstd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
710 /* ??Mstd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
711 MSVCP_bool __cdecl basic_string_char_lower_cstr_bstr(
712 const char *left, const basic_string_char *right)
714 return basic_string_char_compare_cstr(right, left) > 0;
717 /* ??$?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 */
718 /* ??$?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 */
719 /* ??Nstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
720 /* ??Nstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
721 MSVCP_bool __cdecl basic_string_char_leq(
722 const basic_string_char *left, const basic_string_char *right)
724 return basic_string_char_compare(left, right) <= 0;
727 /* ??$?NDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
728 /* ??$?NDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
729 /* ??Nstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
730 /* ??Nstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
731 MSVCP_bool __cdecl basic_string_char_leq_bstr_cstr(
732 const basic_string_char *left, const char *right)
734 return basic_string_char_compare_cstr(left, right) <= 0;
737 /* ??$?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 */
738 /* ??$?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 */
739 /* ??Nstd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
740 /* ??Nstd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
741 MSVCP_bool __cdecl basic_string_char_leq_cstr_bstr(
742 const char *left, const basic_string_char *right)
744 return basic_string_char_compare_cstr(right, left) >= 0;
747 /* ??$?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 */
748 /* ??$?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 */
749 /* ??Ostd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
750 /* ??Ostd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
751 MSVCP_bool __cdecl basic_string_char_greater(
752 const basic_string_char *left, const basic_string_char *right)
754 return basic_string_char_compare(left, right) > 0;
757 /* ??$?ODU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
758 /* ??$?ODU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
759 /* ??Ostd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
760 /* ??Ostd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
761 MSVCP_bool __cdecl basic_string_char_greater_bstr_cstr(
762 const basic_string_char *left, const char *right)
764 return basic_string_char_compare_cstr(left, right) > 0;
767 /* ??$?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 */
768 /* ??$?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 */
769 /* ??Ostd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
770 /* ??Ostd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
771 MSVCP_bool __cdecl basic_string_char_greater_cstr_bstr(
772 const char *left, const basic_string_char *right)
774 return basic_string_char_compare_cstr(right, left) < 0;
777 /* ??$?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 */
778 /* ??$?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 */
779 /* ??Pstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
780 /* ??Pstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0@Z */
781 MSVCP_bool __cdecl basic_string_char_geq(
782 const basic_string_char *left, const basic_string_char *right)
784 return basic_string_char_compare(left, right) >= 0;
787 /* ??$?PDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
788 /* ??$?PDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
789 /* ??Pstd@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBD@Z */
790 /* ??Pstd@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBD@Z */
791 MSVCP_bool __cdecl basic_string_char_geq_bstr_cstr(
792 const basic_string_char *left, const char *right)
794 return basic_string_char_compare_cstr(left, right) >= 0;
797 /* ??$?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 */
798 /* ??$?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 */
799 /* ??Pstd@@YA_NPBDABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
800 /* ??Pstd@@YA_NPEBDAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
801 MSVCP_bool __cdecl basic_string_char_geq_cstr_bstr(
802 const char *left, const basic_string_char *right)
804 return basic_string_char_compare_cstr(right, left) <= 0;
807 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
808 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
809 DEFINE_THISCALL_WRAPPER(basic_string_char_find_cstr_substr, 16)
810 MSVCP_size_t __thiscall basic_string_char_find_cstr_substr(
811 const basic_string_char *this, const char *find, MSVCP_size_t pos, MSVCP_size_t len)
813 const char *p, *end;
815 TRACE("%p %s %lu %lu\n", this, debugstr_a(find), pos, len);
817 if(len==0 && pos<=this->size)
818 return pos;
820 end = this->ptr+this->size-len+1;
821 for(p=this->ptr+pos; p<end; p++) {
822 p = char_traits_char_find(p, end-p, find);
823 if(!p)
824 break;
826 if(!char_traits_char_compare(p, find, len))
827 return p-this->ptr;
830 return basic_string_char_npos;
833 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
834 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
835 DEFINE_THISCALL_WRAPPER(basic_string_char_find_off, 12)
836 MSVCP_size_t __thiscall basic_string_char_find_off(
837 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
839 return basic_string_char_find_cstr_substr(this, find->ptr, off, find->size);
842 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
843 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
844 DEFINE_THISCALL_WRAPPER(basic_string_char_find_ch, 12)
845 MSVCP_size_t __thiscall basic_string_char_find_ch(
846 const basic_string_char *this, char ch, MSVCP_size_t pos)
848 return basic_string_char_find_cstr_substr(this, &ch, pos, 1);
851 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
852 /* ?find@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
853 DEFINE_THISCALL_WRAPPER(basic_string_char_find_cstr_off, 12)
854 MSVCP_size_t __thiscall basic_string_char_find_cstr_off(
855 const basic_string_char *this, const char *find, MSVCP_size_t pos)
857 return basic_string_char_find_cstr_substr(this, find, pos,
858 char_traits_char_length(find));
861 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
862 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
863 DEFINE_THISCALL_WRAPPER(basic_string_char_rfind_cstr_substr, 16)
864 MSVCP_size_t __thiscall basic_string_char_rfind_cstr_substr(
865 const basic_string_char *this, const char *find, MSVCP_size_t pos, MSVCP_size_t len)
867 const char *p, *end;
869 TRACE("%p %s %lu %lu\n", this, debugstr_a(find), pos, len);
871 if(len==0)
872 return pos<this->size ? pos : this->size;
874 if(len > this->size)
875 return basic_string_char_npos;
877 if(pos > this->size-len+1)
878 pos = this->size-len+1;
879 end = this->ptr;
880 for(p=end+pos-1; p>=end; p--) {
881 if(*p==*find && !char_traits_char_compare(p, find, len))
882 return p-this->ptr;
885 return basic_string_char_npos;
888 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
889 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
890 DEFINE_THISCALL_WRAPPER(basic_string_char_rfind_off, 12)
891 MSVCP_size_t __thiscall basic_string_char_rfind_off(
892 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
894 return basic_string_char_rfind_cstr_substr(this, find->ptr, off, find->size);
897 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
898 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
899 DEFINE_THISCALL_WRAPPER(basic_string_char_rfind_ch, 12)
900 MSVCP_size_t __thiscall basic_string_char_rfind_ch(
901 const basic_string_char *this, char ch, MSVCP_size_t pos)
903 return basic_string_char_rfind_cstr_substr(this, &ch, pos, 1);
906 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
907 /* ?rfind@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
908 DEFINE_THISCALL_WRAPPER(basic_string_char_rfind_cstr_off, 12)
909 MSVCP_size_t __thiscall basic_string_char_rfind_cstr_off(
910 const basic_string_char *this, const char *find, MSVCP_size_t pos)
912 return basic_string_char_rfind_cstr_substr(this, find, pos,
913 char_traits_char_length(find));
916 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
917 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
918 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_not_of_cstr_substr, 16)
919 MSVCP_size_t __thiscall basic_string_char_find_first_not_of_cstr_substr(
920 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
922 const char *p, *end;
924 TRACE("%p %p %lu %lu\n", this, find, off, len);
926 if(off<this->size) {
927 end = this->ptr+this->size;
928 for(p=this->ptr+off; p<end; p++)
929 if(!char_traits_char_find(find, len, p))
930 return p-this->ptr;
933 return basic_string_char_npos;
936 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
937 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
938 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_not_of, 12)
939 MSVCP_size_t __thiscall basic_string_char_find_first_not_of(
940 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
942 return basic_string_char_find_first_not_of_cstr_substr(this,
943 find->ptr, off, find->size);
946 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
947 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
948 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_not_of_ch, 12)
949 MSVCP_size_t __thiscall basic_string_char_find_first_not_of_ch(
950 const basic_string_char *this, char ch, MSVCP_size_t off)
952 return basic_string_char_find_first_not_of_cstr_substr(this, &ch, off, 1);
955 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
956 /* ?find_first_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
957 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_not_of_cstr, 12)
958 MSVCP_size_t __thiscall basic_string_char_find_first_not_of_cstr(
959 const basic_string_char *this, const char *find, MSVCP_size_t off)
961 return basic_string_char_find_first_not_of_cstr_substr(
962 this, find, off, char_traits_char_length(find));
965 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
966 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
967 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_of_cstr_substr, 16)
968 MSVCP_size_t __thiscall basic_string_char_find_first_of_cstr_substr(
969 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
971 const char *p, *end;
973 TRACE("%p %p %lu %lu\n", this, find, off, len);
975 if(len>0 && off<this->size) {
976 end = this->ptr+this->size;
977 for(p=this->ptr+off; p<end; p++)
978 if(char_traits_char_find(find, len, p))
979 return p-this->ptr;
982 return basic_string_char_npos;
985 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
986 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
987 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_of, 12)
988 MSVCP_size_t __thiscall basic_string_char_find_first_of(
989 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
991 return basic_string_char_find_first_of_cstr_substr(this,
992 find->ptr, off, find->size);
995 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
996 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
997 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_of_ch, 12)
998 MSVCP_size_t __thiscall basic_string_char_find_first_of_ch(
999 const basic_string_char *this, char ch, MSVCP_size_t off)
1001 return basic_string_char_find_first_of_cstr_substr(this, &ch, off, 1);
1004 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1005 /* ?find_first_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1006 DEFINE_THISCALL_WRAPPER(basic_string_char_find_first_of_cstr, 12)
1007 MSVCP_size_t __thiscall basic_string_char_find_first_of_cstr(
1008 const basic_string_char *this, const char *find, MSVCP_size_t off)
1010 return basic_string_char_find_first_of_cstr_substr(
1011 this, find, off, char_traits_char_length(find));
1014 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1015 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1016 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_not_of_cstr_substr, 16)
1017 MSVCP_size_t __thiscall basic_string_char_find_last_not_of_cstr_substr(
1018 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
1020 const char *p, *beg;
1022 TRACE("%p %p %lu %lu\n", this, find, off, len);
1024 if(len>0 && this->size>0) {
1025 if(off >= this->size)
1026 off = this->size-1;
1028 beg = this->ptr;
1029 for(p=beg+off; p>=beg; p--)
1030 if(!char_traits_char_find(find, len, p))
1031 return p-beg;
1034 return basic_string_char_npos;
1037 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1038 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1039 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_not_of, 12)
1040 MSVCP_size_t __thiscall basic_string_char_find_last_not_of(
1041 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1043 return basic_string_char_find_last_not_of_cstr_substr(this,
1044 find->ptr, off, find->size);
1047 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1048 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1049 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_not_of_ch, 12)
1050 MSVCP_size_t __thiscall basic_string_char_find_last_not_of_ch(
1051 const basic_string_char *this, char ch, MSVCP_size_t off)
1053 return basic_string_char_find_last_not_of_cstr_substr(this, &ch, off, 1);
1056 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1057 /* ?find_last_not_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1058 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_not_of_cstr, 12)
1059 MSVCP_size_t __thiscall basic_string_char_find_last_not_of_cstr(
1060 const basic_string_char *this, const char *find, MSVCP_size_t off)
1062 return basic_string_char_find_last_not_of_cstr_substr(
1063 this, find, off, char_traits_char_length(find));
1066 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDII@Z */
1067 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K1@Z */
1068 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_of_cstr_substr, 16)
1069 MSVCP_size_t __thiscall basic_string_char_find_last_of_cstr_substr(
1070 const basic_string_char *this, const char *find, MSVCP_size_t off, MSVCP_size_t len)
1072 const char *p, *beg;
1074 TRACE("%p %p %lu %lu\n", this, find, off, len);
1076 if(len>0 && this->size>0) {
1077 if(off >= this->size)
1078 off = this->size-1;
1080 beg = this->ptr;
1081 for(p=beg+off; p>=beg; p--)
1082 if(char_traits_char_find(find, len, p))
1083 return p-beg;
1086 return basic_string_char_npos;
1089 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIABV12@I@Z */
1090 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KAEBV12@_K@Z */
1091 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_of, 12)
1092 MSVCP_size_t __thiscall basic_string_char_find_last_of(
1093 const basic_string_char *this, const basic_string_char *find, MSVCP_size_t off)
1095 return basic_string_char_find_last_of_cstr_substr(this,
1096 find->ptr, off, find->size);
1099 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIDI@Z */
1100 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KD_K@Z */
1101 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_of_ch, 12)
1102 MSVCP_size_t __thiscall basic_string_char_find_last_of_ch(
1103 const basic_string_char *this, char ch, MSVCP_size_t off)
1105 return basic_string_char_find_last_of_cstr_substr(this, &ch, off, 1);
1108 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPBDI@Z */
1109 /* ?find_last_of@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEBD_K@Z */
1110 DEFINE_THISCALL_WRAPPER(basic_string_char_find_last_of_cstr, 12)
1111 MSVCP_size_t __thiscall basic_string_char_find_last_of_cstr(
1112 const basic_string_char *this, const char *find, MSVCP_size_t off)
1114 return basic_string_char_find_last_of_cstr_substr(
1115 this, find, off, char_traits_char_length(find));
1118 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */
1119 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
1120 DEFINE_THISCALL_WRAPPER(basic_string_char_append_substr, 16)
1121 basic_string_char* __thiscall basic_string_char_append_substr(basic_string_char *this,
1122 const basic_string_char *append, MSVCP_size_t offset, MSVCP_size_t count)
1124 TRACE("%p %p %lu %lu\n", this, append, offset, count);
1126 if(append->size < offset)
1127 _Xran();
1129 if(count > append->size-offset)
1130 count = append->size-offset;
1132 if(basic_string_char_npos-this->size<=count || this->size+count<this->size)
1133 _Xlen();
1135 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1136 char_traits_char__Copy_s(this->ptr+this->size,
1137 this->res-this->size, append->ptr+offset, count);
1138 basic_string_char__Eos(this, this->size+count);
1141 return this;
1144 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z */
1145 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD_K@Z */
1146 DEFINE_THISCALL_WRAPPER(basic_string_char_append_cstr_len, 12)
1147 basic_string_char* __thiscall basic_string_char_append_cstr_len(
1148 basic_string_char *this, const char *append, MSVCP_size_t count)
1150 TRACE("%p %s %lu\n", this, debugstr_a(append), count);
1152 if(basic_string_char_inside(this, append))
1153 return basic_string_char_append_substr(this, this, append-this->ptr, count);
1155 if(basic_string_char_npos-this->size<=count || this->size+count<this->size)
1156 _Xlen();
1158 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1159 char_traits_char__Copy_s(this->ptr+this->size,
1160 this->res-this->size, append, count);
1161 basic_string_char__Eos(this, this->size+count);
1164 return this;
1167 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */
1168 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KD@Z */
1169 DEFINE_THISCALL_WRAPPER(basic_string_char_append_len_ch, 12)
1170 basic_string_char* __thiscall basic_string_char_append_len_ch(
1171 basic_string_char *this, MSVCP_size_t count, char ch)
1173 TRACE("%p %lu %c\n", this, count, ch);
1175 if(basic_string_char_npos-this->size <= count)
1176 _Xlen();
1178 if(basic_string_char__Grow(this, this->size+count, FALSE)) {
1179 char_traits_char_assignn(this->ptr+this->size, count, ch);
1180 basic_string_char__Eos(this, this->size+count);
1183 return this;
1186 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */
1187 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */
1188 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z */
1189 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@AEBV01@@Z */
1190 DEFINE_THISCALL_WRAPPER(basic_string_char_append, 8)
1191 basic_string_char* __thiscall basic_string_char_append(
1192 basic_string_char *this, const basic_string_char *append)
1194 return basic_string_char_append_substr(this, append,
1195 0, basic_string_char_npos);
1198 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@D@Z */
1199 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@D@Z */
1200 DEFINE_THISCALL_WRAPPER(basic_string_char_append_ch, 8)
1201 basic_string_char* __thiscall basic_string_char_append_ch(
1202 basic_string_char *this, char ch)
1204 return basic_string_char_append_len_ch(this, 1, ch);
1207 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD0@Z */
1208 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD0@Z */
1209 DEFINE_THISCALL_WRAPPER(basic_string_char_append_beg_end, 12)
1210 basic_string_char* __thiscall basic_string_char_append_beg_end(
1211 basic_string_char *this, const char *beg, const char *end)
1213 return basic_string_char_append_cstr_len(this, beg, end-beg);
1216 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z */
1217 /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD@Z */
1218 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z */
1219 /* ??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV01@PEBD@Z */
1220 DEFINE_THISCALL_WRAPPER(basic_string_char_append_cstr, 8)
1221 basic_string_char* __thiscall basic_string_char_append_cstr(
1222 basic_string_char *this, const char *append)
1224 return basic_string_char_append_cstr_len(this, append,
1225 char_traits_char_length(append));
1227 /* ??$?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 */
1228 /* ??$?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 */
1229 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@0@Z */
1230 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@0@Z */
1231 basic_string_char* __cdecl basic_string_char_concatenate(basic_string_char *ret,
1232 const basic_string_char *left, const basic_string_char *right)
1234 TRACE("%p %p\n", left, right);
1236 MSVCP_basic_string_char_copy_ctor(ret, left);
1237 basic_string_char_append(ret, right);
1238 return ret;
1241 /* ??$?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 */
1242 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@D@Z */
1243 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@D@Z */
1244 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@D@Z */
1245 basic_string_char* __cdecl basic_string_char_concatenate_bstr_ch(basic_string_char *ret,
1246 const basic_string_char *left, char right)
1248 TRACE("%p %c\n", left, right);
1250 MSVCP_basic_string_char_copy_ctor(ret, left);
1251 basic_string_char_append_ch(ret, right);
1252 return ret;
1255 /* ??$?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 */
1256 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@PEBD@Z */
1257 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@ABV10@PBD@Z */
1258 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@AEBV10@PEBD@Z */
1259 basic_string_char* __cdecl basic_string_char_concatenate_bstr_cstr(basic_string_char *ret,
1260 const basic_string_char *left, const char *right)
1262 TRACE("%p %s\n", left, debugstr_a(right));
1264 MSVCP_basic_string_char_copy_ctor(ret, left);
1265 basic_string_char_append_cstr(ret, right);
1266 return ret;
1269 /* ??$?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 */
1270 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DAEBV10@@Z */
1271 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DABV10@@Z */
1272 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DAEBV10@@Z */
1273 basic_string_char* __cdecl basic_string_char_concatenate_ch_bstr(basic_string_char *ret,
1274 char left, const basic_string_char *right)
1276 TRACE("%c %p\n", left, right);
1278 basic_string_char_ctor_cstr_len_alloc(ret, &left, 1, NULL);
1279 basic_string_char_append(ret, right);
1280 return ret;
1283 /* ??$?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 */
1284 /* ??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBDAEBV10@@Z */
1285 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PBDABV10@@Z */
1286 /* ??Hstd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@PEBDAEBV10@@Z */
1287 basic_string_char* __cdecl basic_string_char_concatenate_cstr_bstr(basic_string_char *ret,
1288 const char *left, const basic_string_char *right)
1290 TRACE("%s %p\n", debugstr_a(left), right);
1292 basic_string_char_ctor_cstr_alloc(ret, left, NULL);
1293 basic_string_char_append(ret, right);
1294 return ret;
1297 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */
1298 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */
1299 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */
1300 /* ??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */
1301 DEFINE_THISCALL_WRAPPER(basic_string_char_operator_at, 8)
1302 char* __thiscall basic_string_char_operator_at(
1303 basic_string_char *this, MSVCP_size_t pos)
1305 TRACE("%p %lu\n", this, pos);
1307 assert(this->size >= pos);
1308 return this->ptr+pos;
1311 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAADI@Z */
1312 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAD_K@Z */
1313 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z */
1314 /* ?at@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAAEBD_K@Z */
1315 DEFINE_THISCALL_WRAPPER(basic_string_char_at, 8)
1316 char* __thiscall basic_string_char_at(
1317 basic_string_char *this, MSVCP_size_t pos)
1319 TRACE("%p %lu\n", this, pos);
1321 if(this->size <= pos)
1322 _Xran();
1324 return this->ptr+pos;
1327 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBDI@Z */
1328 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD0@Z */
1329 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_cstr_len, 20)
1330 basic_string_char* __thiscall basic_string_char_replace_cstr_len(basic_string_char *this,
1331 MSVCP_size_t off, MSVCP_size_t len, const char *str, MSVCP_size_t str_len)
1333 MSVCP_size_t inside_pos = -1;
1334 char *ptr = this->ptr;
1336 TRACE("%p %ld %ld %p %ld\n", this, off, len, str, str_len);
1338 if(this->size < off)
1339 _Xran();
1341 if(off+len > this->size)
1342 len = this->size-off;
1344 if(basic_string_char_npos-str_len <= this->size-len)
1345 _Xlen();
1347 if(basic_string_char_inside(this, str))
1348 inside_pos = str-ptr;
1350 if(this->size-len+str_len)
1351 basic_string_char__Grow(this, this->size-len+str_len, FALSE);
1352 ptr = this->ptr;
1354 if(inside_pos == -1) {
1355 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1356 memcpy(ptr+off, str, str_len*sizeof(char));
1357 } else if(len >= str_len) {
1358 memmove(ptr+off, ptr+inside_pos, str_len*sizeof(char));
1359 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1360 } else {
1361 MSVCP_size_t size;
1363 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
1365 if(inside_pos < off+len) {
1366 size = off+len-inside_pos;
1367 if(size > str_len)
1368 size = str_len;
1369 memmove(ptr+off, ptr+inside_pos, size*sizeof(char));
1370 } else {
1371 size = 0;
1374 if(str_len > size)
1375 memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(char));
1378 basic_string_char__Eos(this, this->size-len+str_len);
1379 return this;
1382 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@II@Z */
1383 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0AEBV12@00@Z */
1384 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_substr, 24)
1385 basic_string_char* __thiscall basic_string_char_replace_substr(basic_string_char *this, MSVCP_size_t off,
1386 MSVCP_size_t len, const basic_string_char *str, MSVCP_size_t str_off, MSVCP_size_t str_len)
1388 if(str->size < str_off)
1389 _Xran();
1391 if(str_off+str_len > str->size)
1392 str_len = str->size-str_off;
1394 return basic_string_char_replace_cstr_len(this, off, len,
1395 str->ptr+str_off, str_len);
1398 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@@Z */
1399 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0AEBV12@@Z */
1400 DEFINE_THISCALL_WRAPPER(basic_string_char_replace, 16)
1401 basic_string_char* __thiscall basic_string_char_replace(basic_string_char *this,
1402 MSVCP_size_t off, MSVCP_size_t len, const basic_string_char *str)
1404 return basic_string_char_replace_cstr_len(this, off, len,
1405 str->ptr, str->size);
1408 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIID@Z */
1409 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K00D@Z */
1410 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_ch, 20)
1411 basic_string_char* __thiscall basic_string_char_replace_ch(basic_string_char *this,
1412 MSVCP_size_t off, MSVCP_size_t len, MSVCP_size_t count, char ch)
1414 char *ptr = this->ptr;
1416 TRACE("%p %ld %ld %ld %c\n", this, off, len, count, ch);
1418 if(this->size < off)
1419 _Xran();
1421 if(off+len > this->size)
1422 len = this->size-off;
1424 if(basic_string_char_npos-count <= this->size-len)
1425 _Xlen();
1427 if(this->size-len+count)
1428 basic_string_char__Grow(this, this->size-len+count, FALSE);
1429 ptr = this->ptr;
1431 memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(char));
1432 char_traits_char_assignn(ptr+off, count, ch);
1433 basic_string_char__Eos(this, this->size-len+count);
1435 return this;
1438 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIPBD@Z */
1439 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0PEBD@Z */
1440 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_cstr, 16)
1441 basic_string_char* __thiscall basic_string_char_replace_cstr(basic_string_char *this,
1442 MSVCP_size_t off, MSVCP_size_t len, const char *str)
1444 return basic_string_char_replace_cstr_len(this, off, len, str,
1445 char_traits_char_length(str));
1448 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0ABV12@@Z */
1449 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0AEBV12@@Z */
1450 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_bstr, 16)
1451 basic_string_char* __thiscall basic_string_char_replace_iter_bstr(basic_string_char *this,
1452 char *beg, char *end, const basic_string_char *str)
1454 return basic_string_char_replace(this, basic_string_char__Pdif(beg, this->ptr),
1455 basic_string_char__Pdif(end, beg), str);
1458 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0ID@Z */
1459 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0_KD@Z */
1460 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_chn, 20)
1461 basic_string_char* __thiscall basic_string_char_replace_iter_chn(basic_string_char *this,
1462 char *beg, char *end, MSVCP_size_t count, char ch)
1464 return basic_string_char_replace_ch(this, basic_string_char__Pdif(beg, this->ptr),
1465 basic_string_char__Pdif(end, beg), count, ch);
1468 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBD1@Z */
1469 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD1@Z */
1470 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_iter, 20)
1471 basic_string_char* __thiscall basic_string_char_replace_iter_iter(basic_string_char *this,
1472 char *beg1, char *end1, const char *beg2, const char *end2)
1474 return basic_string_char_replace_cstr_len(this, basic_string_char__Pdif(beg1, this->ptr),
1475 basic_string_char__Pdif(end1, beg1), beg2, basic_string_char__Pdif(end2, beg2));
1478 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBD@Z */
1479 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD@Z */
1480 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr, 16)
1481 basic_string_char* __thiscall basic_string_char_replace_iter_cstr(basic_string_char *this,
1482 char *beg, char *end, const char *str)
1484 return basic_string_char_replace_cstr(this, basic_string_char__Pdif(beg, this->ptr),
1485 basic_string_char__Pdif(end, beg), str);
1488 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PAD0PBDI@Z */
1489 /* ?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEAD0PEBD_K@Z */
1490 DEFINE_THISCALL_WRAPPER(basic_string_char_replace_iter_cstr_len, 20)
1491 basic_string_char* __thiscall basic_string_char_replace_iter_cstr_len(basic_string_char *this,
1492 char *beg, char *end, const char *str, MSVCP_size_t len)
1494 return basic_string_char_replace_cstr_len(this, basic_string_char__Pdif(beg, this->ptr),
1495 basic_string_char__Pdif(end, beg), str, len);
1498 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IABV12@@Z */
1499 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KAEBV12@@Z */
1500 DEFINE_THISCALL_WRAPPER(basic_string_char_insert, 12)
1501 basic_string_char* __thiscall basic_string_char_insert(basic_string_char *this,
1502 MSVCP_size_t off, const basic_string_char *str)
1504 return basic_string_char_replace(this, off, 0, str);
1507 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IABV12@II@Z */
1508 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KAEBV12@00@Z */
1509 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_substr, 20)
1510 basic_string_char* __thiscall basic_string_char_insert_substr(
1511 basic_string_char *this, MSVCP_size_t off, const basic_string_char *str,
1512 MSVCP_size_t str_off, MSVCP_size_t str_count)
1514 return basic_string_char_replace_substr(this, off, 0, str, str_off, str_count);
1517 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IPBD@Z */
1518 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KPEBD@Z */
1519 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_cstr, 12)
1520 basic_string_char* __thiscall basic_string_char_insert_cstr(
1521 basic_string_char *this, MSVCP_size_t off, const char *str)
1523 return basic_string_char_replace_cstr(this, off, 0, str);
1526 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IPBDI@Z */
1527 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_KPEBD0@Z */
1528 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_cstr_len, 16)
1529 basic_string_char* __thiscall basic_string_char_insert_cstr_len(basic_string_char *this,
1530 MSVCP_size_t off, const char *str, MSVCP_size_t str_len)
1532 return basic_string_char_replace_cstr_len(this, off, 0, str, str_len);
1535 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IID@Z */
1536 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@_K0D@Z */
1537 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_chn, 16)
1538 basic_string_char* __thiscall basic_string_char_insert_chn(basic_string_char *this,
1539 MSVCP_size_t off, MSVCP_size_t count, char ch)
1541 return basic_string_char_replace_ch(this, off, 0, count, ch);
1544 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADPADD@Z */
1545 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADPEADD@Z */
1546 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter_ch, 12)
1547 char* __thiscall basic_string_char_insert_iter_ch(basic_string_char *this, char *pos, char ch)
1549 MSVCP_size_t off = basic_string_char__Pdif(pos, this->ptr);
1550 basic_string_char_insert_chn(this, off, 1, ch);
1551 return basic_string_char__Psum(this->ptr, off);
1554 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXPADID@Z */
1555 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXPEAD_KD@Z */
1556 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter_chn, 16)
1557 void __thiscall basic_string_char_insert_iter_chn(basic_string_char *this,
1558 char *pos, MSVCP_size_t n, char ch)
1560 basic_string_char_insert_chn(this, basic_string_char__Pdif(pos, this->ptr), n, ch);
1563 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXPADPBD1@Z */
1564 /* ?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXPEADPEBD1@Z */
1565 DEFINE_THISCALL_WRAPPER(basic_string_char_insert_iter, 16)
1566 void __thiscall basic_string_char_insert_iter(basic_string_char *this,
1567 char *pos, const char *beg, const char *end)
1569 basic_string_char_insert_cstr_len(this, basic_string_char__Pdif(pos, this->ptr),
1570 beg, basic_string_char__Pdif(end, beg));
1573 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXID@Z */
1574 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_KD@Z */
1575 DEFINE_THISCALL_WRAPPER(basic_string_char_resize_ch, 12)
1576 void __thiscall basic_string_char_resize_ch(
1577 basic_string_char *this, MSVCP_size_t size, char ch)
1579 TRACE("%p %lu %c\n", this, size, ch);
1581 if(size <= this->size)
1582 basic_string_char_erase(this, size, this->size);
1583 else
1584 basic_string_char_append_len_ch(this, size-this->size, ch);
1587 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z */
1588 /* ?resize@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z */
1589 DEFINE_THISCALL_WRAPPER(basic_string_char_resize, 8)
1590 void __thiscall basic_string_char_resize(
1591 basic_string_char *this, MSVCP_size_t size)
1593 basic_string_char_resize_ch(this, size, '\0');
1596 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADXZ */
1597 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADXZ */
1598 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1599 /* ?begin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1600 DEFINE_THISCALL_WRAPPER(basic_string_char_begin, 4)
1601 char* __thiscall basic_string_char_begin(basic_string_char *this)
1603 TRACE("(%p)\n", this);
1604 basic_string_char__Freeze(this);
1605 return this->ptr;
1608 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEPADXZ */
1609 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAPEADXZ */
1610 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1611 /* ?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1612 DEFINE_THISCALL_WRAPPER(basic_string_char_end, 4)
1613 char* __thiscall basic_string_char_end(basic_string_char *this)
1615 TRACE("(%p)\n", this);
1616 basic_string_char__Freeze(this);
1617 return this->ptr+this->size;
1620 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@PADDAADPADH@2@XZ */
1621 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@PEADDAEADPEAD_J@2@XZ */
1622 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@PBDDABDPBDH@2@XZ */
1623 /* ?rbegin@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@PEBDDAEBDPEBD_J@2@XZ */
1624 DEFINE_THISCALL_WRAPPER(basic_string_char_rbegin, 8)
1625 String_reverse_iterator_char* __thiscall basic_string_char_rbegin(
1626 basic_string_char *this, String_reverse_iterator_char *ret)
1628 TRACE("(%p %p)\n", this, ret);
1629 ret->ptr = basic_string_char_end(this);
1630 return ret;
1633 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$reverse_iterator@PADDAADPADH@2@XZ */
1634 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$reverse_iterator@PEADDAEADPEAD_J@2@XZ */
1635 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$reverse_iterator@PBDDABDPBDH@2@XZ */
1636 /* ?rend@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$reverse_iterator@PEBDDAEBDPEBD_J@2@XZ */
1637 DEFINE_THISCALL_WRAPPER(basic_string_char_rend, 8)
1638 String_reverse_iterator_char* __thiscall basic_string_char_rend(
1639 basic_string_char *this, String_reverse_iterator_char *ret)
1641 TRACE("(%p %p)\n", this, ret);
1642 ret->ptr = basic_string_char_begin(this);
1643 return ret;
1646 /* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1647 /* ?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1648 /* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ */
1649 /* ?data@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEBDXZ */
1650 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_c_str, 4)
1651 const char* __thiscall MSVCP_basic_string_char_c_str(const basic_string_char *this)
1653 TRACE("%p\n", this);
1654 return this->ptr;
1657 /* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1658 /* ?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1659 /* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1660 /* ?length@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1661 DEFINE_THISCALL_WRAPPER(basic_string_char_length, 4)
1662 MSVCP_size_t __thiscall basic_string_char_length(basic_string_char *this)
1664 TRACE("%p\n", this);
1665 return this->size;
1668 /* ?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1669 /* ?max_size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1670 DEFINE_THISCALL_WRAPPER(basic_string_char_max_size, 4)
1671 MSVCP_size_t __thiscall basic_string_char_max_size(const basic_string_char *this)
1673 TRACE("%p\n", this);
1674 return MSVCP_allocator_char_max_size(NULL)-1;
1677 /* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ */
1678 /* ?capacity@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ */
1679 DEFINE_THISCALL_WRAPPER(basic_string_char_capacity, 4)
1680 MSVCP_size_t __thiscall basic_string_char_capacity(basic_string_char *this)
1682 TRACE("%p\n", this);
1683 return this->res;
1686 /* ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXI@Z */
1687 /* ?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z */
1688 DEFINE_THISCALL_WRAPPER(basic_string_char_reserve, 8)
1689 void __thiscall basic_string_char_reserve(basic_string_char *this, MSVCP_size_t size)
1691 MSVCP_size_t len;
1693 TRACE("%p %ld\n", this, size);
1695 len = this->size;
1696 if(len > size)
1697 return;
1699 basic_string_char__Grow(this, size, FALSE);
1700 basic_string_char__Eos(this, len);
1703 /* ?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE_NXZ */
1704 /* ?empty@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_NXZ */
1705 DEFINE_THISCALL_WRAPPER(basic_string_char_empty, 4)
1706 MSVCP_bool __thiscall basic_string_char_empty(basic_string_char *this)
1708 TRACE("%p\n", this);
1709 return this->size == 0;
1712 /* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXAAV12@@Z */
1713 /* ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEAV12@@Z */
1714 DEFINE_THISCALL_WRAPPER(basic_string_char_swap, 8)
1715 void __thiscall basic_string_char_swap(basic_string_char *this, basic_string_char *str)
1717 basic_string_char tmp;
1718 TRACE("%p %p\n", this, str);
1720 tmp = *this;
1721 *this = *str;
1722 *str = tmp;
1725 /* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV12@II@Z */
1726 /* ?substr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV12@_K0@Z */
1727 DEFINE_THISCALL_WRAPPER(basic_string_char_substr, 16)
1728 basic_string_char* __thiscall basic_string_char_substr(basic_string_char *this,
1729 basic_string_char *ret, MSVCP_size_t off, MSVCP_size_t len)
1731 TRACE("%p %lu %lu\n", this, off, len);
1733 basic_string_char_ctor_substr_alloc(ret, this, off, len, NULL);
1734 return ret;
1737 /* ?copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIPADII@Z */
1738 /* ?copy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KPEAD_K1@Z */
1739 DEFINE_THISCALL_WRAPPER(basic_string_char_copy, 16)
1740 MSVCP_size_t __thiscall basic_string_char_copy(const basic_string_char *this,
1741 char *dest, MSVCP_size_t count, MSVCP_size_t off)
1743 TRACE("%p %p %lu %lu\n", this, dest, count, off);
1745 if(off > this->size)
1746 _Xran();
1747 if(count > this->size-off)
1748 count = this->size-off;
1749 char_traits_char__Copy_s(dest, count, this->ptr+off, count);
1750 return count;
1753 /* ?get_allocator@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$allocator@D@2@XZ */
1754 /* ?get_allocator@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$allocator@D@2@XZ */
1755 DEFINE_THISCALL_WRAPPER(basic_string_char_get_allocator, 8)
1756 allocator* __thiscall basic_string_char_get_allocator(const basic_string_char *this, allocator *ret)
1758 TRACE("%p\n", this);
1759 return ret;
1762 static wchar_t* char_traits_wchar__Move_s(wchar_t *dest,
1763 MSVCP_size_t size, const wchar_t *src, MSVCP_size_t count)
1765 if(!dest || !src || size<count) {
1766 if(dest && size)
1767 dest[0] = '\0';
1768 _invalid_parameter(NULL, NULL, NULL, 0, 0);
1769 return dest;
1772 return memmove(dest, src, count);
1775 static wchar_t* char_traits_wchar__Copy_s(wchar_t *dest,
1776 MSVCP_size_t size, const wchar_t *src, MSVCP_size_t count)
1778 if(!dest || !src || size<count) {
1779 if(dest && size)
1780 dest[0] = '\0';
1781 _invalid_parameter(NULL, NULL, NULL, 0, 0);
1782 return dest;
1785 return memcpy(dest, src, count);
1788 static MSVCP_size_t char_traits_wchar_length(const wchar_t *str)
1790 return wcslen((WCHAR*)str);
1793 static wchar_t* char_traits_wchar_assignn(wchar_t *str, MSVCP_size_t num, wchar_t c)
1795 return memset(str, c, num);
1798 static int char_traits_wchar_compare(const wchar_t *s1,
1799 const wchar_t *s2, MSVCP_size_t count)
1801 int ret = memcmp(s1, s2, count);
1802 return (ret>0 ? 1 : (ret<0 ? -1 : 0));
1805 static const wchar_t* char_traits_wchar_find(const wchar_t *str,
1806 MSVCP_size_t range, const wchar_t *c)
1808 return memchr(str, *c, range);
1811 static MSVCP_bool basic_string_wchar_inside(
1812 basic_string_wchar *this, const wchar_t *ptr)
1814 return (ptr<this->ptr || ptr>=this->ptr+this->size) ? FALSE : TRUE;
1817 /* ?npos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@2IB */
1818 /* ?npos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@2_KB */
1819 const MSVCP_size_t basic_string_wchar_npos = -1;
1821 /* ?_C@?1??_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGXZ@4GB */
1822 /* ?_C@?1??_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGXZ@4GB */
1823 const wchar_t basic_string_wchar_nullbyte = '\0';
1825 /* ?_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGXZ */
1826 /* ?_Nullstr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGXZ */
1827 const wchar_t* __cdecl basic_string_wchar__Nullstr(void)
1829 return &basic_string_wchar_nullbyte;
1832 /* ?_Refcnt@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEAAEPBG@Z */
1833 /* ?_Refcnt@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAAEAEPEBG@Z */
1834 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Refcnt, 8)
1835 unsigned short* __thiscall basic_string_wchar__Refcnt(basic_string_wchar *this, const wchar_t *ptr)
1837 TRACE("(%p %p)\n", this, ptr);
1838 return (unsigned short*)ptr-1;
1841 /* ?_Eos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXI@Z */
1842 /* ?_Eos@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_K@Z */
1843 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Eos, 8)
1844 void __thiscall basic_string_wchar__Eos(basic_string_wchar *this, MSVCP_size_t len)
1846 this->size = len;
1847 this->ptr[len] = 0;
1850 /* ?_Tidy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEX_N@Z */
1851 /* ?_Tidy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_N@Z */
1852 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Tidy, 8)
1853 void __thiscall basic_string_wchar__Tidy(basic_string_wchar *this, MSVCP_bool built)
1855 TRACE("(%p %d)\n", this, built);
1857 if(!this->ptr || !built);
1858 else if(!this->ptr[-1] || (unsigned short)this->ptr[-1]==FROZEN)
1859 MSVCP_allocator_wchar_deallocate(NULL, this->ptr, this->res+2);
1860 else
1861 this->ptr[-1]--;
1863 memset(this, 0, sizeof(*this));
1866 /* ?_Grow@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAE_NI_N@Z */
1867 /* ?_Grow@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAA_N_K_N@Z */
1868 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Grow, 12)
1869 MSVCP_bool __thiscall basic_string_wchar__Grow(basic_string_wchar *this, MSVCP_size_t new_size, MSVCP_bool trim)
1871 if(!new_size) {
1872 if(trim)
1873 basic_string_wchar__Tidy(this, TRUE);
1874 else if(this->ptr)
1875 basic_string_wchar__Eos(this, 0);
1876 } else if(this->res<new_size || trim ||
1877 (this->ptr && this->ptr[-1] && (unsigned short)this->ptr[-1]!=FROZEN)) {
1878 MSVCP_size_t new_res = new_size, len = this->size;
1879 wchar_t *ptr;
1881 if(!trim && this->ptr && !this->ptr[-1]) {
1882 new_res |= 0xf;
1883 if(new_res/3 < this->res/2)
1884 new_res = this->res + this->res/2;
1887 ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_res+2);
1888 if(!ptr) {
1889 new_res = new_size;
1890 ptr = MSVCP_allocator_wchar_allocate(this->allocator, new_size+2);
1892 if(!ptr) {
1893 ERR("Out of memory\n");
1894 return FALSE;
1897 *ptr = 0;
1898 if(this->ptr)
1899 char_traits_wchar__Copy_s(ptr+1, new_size, this->ptr, this->size);
1900 basic_string_wchar__Tidy(this, TRUE);
1901 this->ptr = ptr+1;
1902 this->res = new_res;
1903 basic_string_wchar__Eos(this, len>new_res ? new_res : len);
1906 return new_size>0;
1909 /* ?_Split@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXXZ */
1910 /* ?_Split@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAXXZ */
1911 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Split, 4)
1912 void __thiscall basic_string_wchar__Split(basic_string_wchar *this)
1914 MSVCP_size_t len;
1915 wchar_t *ptr;
1917 TRACE("(%p)\n", this);
1919 if(!this->ptr || !this->ptr[-1] || (unsigned short)this->ptr[-1]==FROZEN)
1920 return;
1922 ptr = this->ptr;
1923 len = this->size;
1924 basic_string_wchar__Tidy(this, TRUE);
1925 if(basic_string_wchar__Grow(this, len, FALSE)) {
1926 char_traits_wchar__Copy_s(this->ptr, this->res, ptr, len);
1927 basic_string_wchar__Eos(this, len);
1931 /* ?_Freeze@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXXZ */
1932 /* ?_Freeze@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAXXZ */
1933 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Freeze, 4)
1934 void __thiscall basic_string_wchar__Freeze(basic_string_wchar *this)
1936 TRACE("(%p)\n", this);
1937 basic_string_wchar__Split(this);
1938 if(this->ptr)
1939 this->ptr[-1] = FROZEN;
1942 /* ?_Copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEXI@Z */
1943 /* ?_Copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAX_K@Z */
1944 DEFINE_THISCALL_WRAPPER(basic_string_wchar__Copy, 8)
1945 void __thiscall basic_string_wchar__Copy(basic_string_wchar *this, MSVCP_size_t copy_len)
1947 TRACE("%p %lu\n", this, copy_len);
1949 if(!basic_string_wchar__Grow(this, copy_len, FALSE))
1950 return;
1951 basic_string_wchar__Eos(this, copy_len);
1954 /* ?_Pdif@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAIPBG0@Z */
1955 /* ?_Pdif@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CA_KPEBG0@Z */
1956 MSVCP_size_t __cdecl basic_string_wchar__Pdif(const wchar_t *i1, const wchar_t *i2)
1958 TRACE("(%p %p)\n", i1, i2);
1959 return !i1 ? 0 : i1-i2;
1962 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPAGPAGI@Z */
1963 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEAGPEAG_K@Z */
1964 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPBGPBGI@Z */
1965 /* ?_Psum@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@CAPEBGPEBG_K@Z */
1966 wchar_t* __cdecl basic_string_wchar__Psum(wchar_t *iter, MSVCP_size_t add)
1968 TRACE("(%p %lu)\n", iter, add);
1969 return iter ? iter+add : iter;
1972 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@II@Z */
1973 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0@Z */
1974 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase, 12)
1975 basic_string_wchar* __thiscall basic_string_wchar_erase(
1976 basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t len)
1978 TRACE("%p %lu %lu\n", this, pos, len);
1980 if(pos > this->size)
1981 _Xran();
1983 if(len > this->size-pos)
1984 len = this->size-pos;
1986 if(len) {
1987 basic_string_wchar__Split(this);
1988 char_traits_wchar__Move_s(this->ptr+pos, this->res-pos,
1989 this->ptr+pos+len, this->size-pos-len);
1990 basic_string_wchar__Eos(this, this->size-len);
1993 return this;
1996 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAG0@Z */
1997 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAG0@Z */
1998 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase_iter, 12)
1999 wchar_t* __thiscall basic_string_wchar_erase_iter(basic_string_wchar *this, wchar_t *beg, wchar_t *end)
2001 MSVCP_size_t pos = basic_string_wchar__Pdif(beg, this->ptr);
2002 basic_string_wchar_erase(this, pos, basic_string_wchar__Pdif(end, beg));
2003 return basic_string_wchar__Psum(this->ptr, pos);
2006 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAG@Z */
2007 /* ?erase@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAG@Z */
2008 DEFINE_THISCALL_WRAPPER(basic_string_wchar_erase_beg, 8)
2009 wchar_t* __thiscall basic_string_wchar_erase_beg(basic_string_wchar *this, wchar_t *beg)
2011 MSVCP_size_t pos = beg-this->ptr;
2012 basic_string_wchar_erase(this, pos, 1);
2013 return this->ptr+pos;
2016 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@II@Z */
2017 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
2018 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_substr, 16)
2019 basic_string_wchar* __thiscall basic_string_wchar_assign_substr(
2020 basic_string_wchar *this, const basic_string_wchar *assign,
2021 MSVCP_size_t pos, MSVCP_size_t len)
2023 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
2025 if(assign->size < pos)
2026 _Xran();
2028 if(len > assign->size-pos)
2029 len = assign->size-pos;
2031 if(this == assign) {
2032 basic_string_wchar_erase(this, pos+len, basic_string_wchar_npos);
2033 basic_string_wchar_erase(this, 0, pos);
2034 } else if(basic_string_wchar__Grow(this, len, FALSE)) {
2035 char_traits_wchar__Copy_s(this->ptr, this->res,
2036 assign->ptr+pos, len);
2037 basic_string_wchar__Eos(this, len);
2040 return this;
2043 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBGI@Z */
2044 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG_K@Z */
2045 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_cstr_len, 12)
2046 basic_string_wchar* __thiscall basic_string_wchar_assign_cstr_len(
2047 basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
2049 TRACE("%p %s %lu\n", this, debugstr_w(str), len);
2051 if(basic_string_wchar_inside(this, str))
2052 return basic_string_wchar_assign_substr(this, this, str-this->ptr, len);
2053 else if(basic_string_wchar__Grow(this, len, FALSE)) {
2054 char_traits_wchar__Copy_s(this->ptr, this->res, str, len);
2055 basic_string_wchar__Eos(this, len);
2058 return this;
2061 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@@Z */
2062 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@@Z */
2063 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@ABV01@@Z */
2064 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@AEBV01@@Z */
2065 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign, 8)
2066 basic_string_wchar* __thiscall basic_string_wchar_assign(
2067 basic_string_wchar *this, const basic_string_wchar *assign)
2069 return basic_string_wchar_assign_substr(this, assign,
2070 0, basic_string_wchar_npos);
2073 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG@Z */
2074 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG@Z */
2075 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@PBG@Z */
2076 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@PEBG@Z */
2077 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_cstr, 8)
2078 basic_string_wchar* __thiscall basic_string_wchar_assign_cstr(
2079 basic_string_wchar *this, const wchar_t *str)
2081 return basic_string_wchar_assign_cstr_len(this, str,
2082 char_traits_wchar_length(str));
2085 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@G@Z */
2086 /* ??4?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@G@Z */
2087 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_ch, 8)
2088 basic_string_wchar* __thiscall basic_string_wchar_assign_ch(
2089 basic_string_wchar *this, wchar_t ch)
2091 return basic_string_wchar_assign_cstr_len(this, &ch, 1);
2094 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IG@Z */
2095 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KG@Z */
2096 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assignn, 12)
2097 basic_string_wchar* __thiscall basic_string_wchar_assignn(
2098 basic_string_wchar *this, MSVCP_size_t count, wchar_t ch)
2100 TRACE("%p %ld %c\n", this, count, ch);
2102 basic_string_wchar__Grow(this, count, FALSE);
2103 char_traits_wchar_assignn(this->ptr, count, ch);
2104 basic_string_wchar__Eos(this, count);
2105 return this;
2108 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG0@Z */
2109 /* ?assign@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG0@Z */
2110 DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_ptr_ptr, 12)
2111 basic_string_wchar* __thiscall basic_string_wchar_assign_ptr_ptr(
2112 basic_string_wchar *this, const wchar_t *first, const wchar_t *last)
2114 return basic_string_wchar_assign_cstr_len(this, first, last-first);
2117 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBGIABV?$allocator@G@1@@Z */
2118 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG_KAEBV?$allocator@G@1@@Z */
2119 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_cstr_len_alloc, 16)
2120 basic_string_wchar* __thiscall basic_string_wchar_ctor_cstr_len_alloc(
2121 basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len, const void *alloc)
2123 TRACE("%p %s %ld\n", this, debugstr_w(str), len);
2125 basic_string_wchar__Tidy(this, FALSE);
2126 basic_string_wchar_assign_cstr_len(this, str, len);
2127 return this;
2130 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV01@IIABV?$allocator@G@1@@Z */
2131 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV01@_K1AEBV?$allocator@G@1@@Z */
2132 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_substr_alloc, 20)
2133 basic_string_wchar* __thiscall basic_string_wchar_ctor_substr_alloc(
2134 basic_string_wchar *this, const basic_string_wchar *assign,
2135 MSVCP_size_t pos, MSVCP_size_t len, const void *alloc)
2137 TRACE("%p %p %lu %lu\n", this, assign, pos, len);
2139 basic_string_wchar__Tidy(this, FALSE);
2140 basic_string_wchar_assign_substr(this, assign, pos, len);
2141 return this;
2144 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBGABV?$allocator@G@1@@Z */
2145 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBGAEBV?$allocator@G@1@@Z */
2146 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_cstr_alloc, 12)
2147 basic_string_wchar* __thiscall basic_string_wchar_ctor_cstr_alloc(
2148 basic_string_wchar *this, const wchar_t *str, const void *alloc)
2150 TRACE("%p %s\n", this, debugstr_w(str));
2152 basic_string_wchar__Tidy(this, FALSE);
2153 basic_string_wchar_assign_cstr(this, str);
2154 return this;
2157 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr(
2158 basic_string_wchar *this, const wchar_t *str)
2160 return basic_string_wchar_ctor_cstr_alloc(this, str, NULL);
2163 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@IGABV?$allocator@G@1@@Z */
2164 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@_KGAEBV?$allocator@G@1@@Z */
2165 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_ch_alloc, 16)
2166 basic_string_wchar* __thiscall basic_string_wchar_ctor_ch_alloc(basic_string_wchar *this,
2167 MSVCP_size_t count, wchar_t ch, const void *alloc)
2169 TRACE("%p %ld %c\n", this, count, ch);
2171 basic_string_wchar__Tidy(this, FALSE);
2172 basic_string_wchar_assignn(this, count, ch);
2173 return this;
2176 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@PBG0ABV?$allocator@G@1@@Z */
2177 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@PEBG0AEBV?$allocator@G@1@@Z */
2178 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_iter, 16)
2179 basic_string_wchar* __thiscall basic_string_wchar_ctor_iter(basic_string_wchar *this,
2180 const wchar_t *first, const wchar_t *last, allocator *alloc)
2182 TRACE("(%p %p %p %p)\n", this, first, last, alloc);
2184 basic_string_wchar__Tidy(this, FALSE);
2185 basic_string_wchar_assign_cstr_len(this, first, basic_string_wchar__Pdif(last, first));
2186 return this;
2189 /* ??_F?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
2190 /* ??_F?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
2191 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor, 4)
2192 basic_string_wchar* __thiscall basic_string_wchar_ctor(basic_string_wchar *this)
2194 TRACE("%p\n", this);
2196 basic_string_wchar__Tidy(this, FALSE);
2197 return this;
2200 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$allocator@G@1@@Z */
2201 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV?$allocator@G@1@@Z */
2202 DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_alloc, 8)
2203 basic_string_wchar* __thiscall basic_string_wchar_ctor_alloc(
2204 basic_string_wchar *this, const void *alloc)
2206 TRACE("%p %p\n", this, alloc);
2208 basic_string_wchar__Tidy(this, FALSE);
2209 return this;
2212 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV01@@Z */
2213 /* ??0?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV01@@Z */
2214 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_copy_ctor, 8)
2215 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_copy_ctor(
2216 basic_string_wchar *this, const basic_string_wchar *copy)
2218 TRACE("%p %p\n", this, copy);
2220 basic_string_wchar__Tidy(this, FALSE);
2221 basic_string_wchar_assign(this, copy);
2222 return this;
2225 /* ??1?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@XZ */
2226 /* ??1?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@XZ */
2227 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_dtor, 4)
2228 void __thiscall MSVCP_basic_string_wchar_dtor(basic_string_wchar *this)
2230 TRACE("%p\n", this);
2231 basic_string_wchar__Tidy(this, TRUE);
2234 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIPBGI@Z */
2235 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0PEBG0@Z */
2236 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr_cstr_len, 20)
2237 int __thiscall basic_string_wchar_compare_substr_cstr_len(
2238 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2239 const wchar_t *str, MSVCP_size_t count)
2241 int ans;
2243 TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_w(str), count);
2245 if(this->size < pos)
2246 _Xran();
2248 if(pos+num > this->size)
2249 num = this->size-pos;
2251 ans = char_traits_wchar_compare(this->ptr+pos,
2252 str, num>count ? count : num);
2253 if(ans)
2254 return ans;
2256 if(num > count)
2257 ans = 1;
2258 else if(num < count)
2259 ans = -1;
2260 return ans;
2263 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHPBG@Z */
2264 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAHPEBG@Z */
2265 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_cstr, 8)
2266 int __thiscall basic_string_wchar_compare_cstr(
2267 const basic_string_wchar *this, const wchar_t *str)
2269 return basic_string_wchar_compare_substr_cstr_len(this, 0, this->size,
2270 str, char_traits_wchar_length(str));
2273 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIABV12@II@Z */
2274 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0AEBV12@00@Z */
2275 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr_substr, 24)
2276 int __thiscall basic_string_wchar_compare_substr_substr(
2277 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2278 const basic_string_wchar *compare, MSVCP_size_t off, MSVCP_size_t count)
2280 TRACE("%p %lu %lu %p %lu %lu\n", this, pos, num, compare, off, count);
2282 if(compare->size < off)
2283 _Xran();
2285 if(off+count > compare->size)
2286 count = compare->size-off;
2288 return basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2289 compare->ptr+off, count);
2292 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIABV12@@Z */
2293 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0AEBV12@@Z */
2294 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr, 16)
2295 int __thiscall basic_string_wchar_compare_substr(
2296 const basic_string_wchar *this, MSVCP_size_t pos, MSVCP_size_t num,
2297 const basic_string_wchar *compare)
2299 return basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2300 compare->ptr, compare->size);
2303 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHABV12@@Z */
2304 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAHAEBV12@@Z */
2305 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare, 8)
2306 int __thiscall basic_string_wchar_compare(
2307 const basic_string_wchar *this, const basic_string_wchar *compare)
2309 return basic_string_wchar_compare_substr_cstr_len(this, 0, this->size,
2310 compare->ptr, compare->size);
2313 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEHIIPBG@Z */
2314 /* ?compare@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAH_K0PEBG@Z */
2315 DEFINE_THISCALL_WRAPPER(basic_string_wchar_compare_substr_cstr, 16)
2316 int __thiscall basic_string_wchar_compare_substr_cstr(const basic_string_wchar *this,
2317 MSVCP_size_t pos, MSVCP_size_t num, const wchar_t *str)
2319 return basic_string_wchar_compare_substr_cstr_len(this, pos, num,
2320 str, char_traits_wchar_length(str));
2323 /* ??$?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 */
2324 /* ??$?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 */
2325 /* ??8std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2326 /* ??8std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2327 MSVCP_bool __cdecl basic_string_wchar_equal(
2328 const basic_string_wchar *left, const basic_string_wchar *right)
2330 return basic_string_wchar_compare(left, right) == 0;
2333 /* ??$?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 */
2334 /* ??$?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 */
2335 /* ??8std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2336 /* ??8std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2337 MSVCP_bool __cdecl basic_string_wchar_equal_str_cstr(
2338 const basic_string_wchar *left, const wchar_t *right)
2340 return basic_string_wchar_compare_cstr(left, right) == 0;
2343 /* ??$?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 */
2344 /* ??$?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 */
2345 /* ??8std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2346 /* ??8std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2347 MSVCP_bool __cdecl basic_string_wchar_equal_cstr_str(
2348 const wchar_t *left, const basic_string_wchar *right)
2350 return basic_string_wchar_compare_cstr(right, left) == 0;
2353 /* ??$?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 */
2354 /* ??$?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 */
2355 /* ??9std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2356 /* ??9std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2357 MSVCP_bool __cdecl basic_string_wchar_not_equal(
2358 const basic_string_wchar *left, const basic_string_wchar *right)
2360 return basic_string_wchar_compare(left, right) != 0;
2363 /* ??$?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 */
2364 /* ??$?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 */
2365 /* ??9std@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2366 /* ??9std@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2367 MSVCP_bool __cdecl basic_string_wchar_not_equal_str_cstr(
2368 const basic_string_wchar *left, const wchar_t *right)
2370 return basic_string_wchar_compare_cstr(left, right) != 0;
2373 /* ??$?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 */
2374 /* ??$?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 */
2375 /* ??9std@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2376 /* ??9std@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2377 MSVCP_bool __cdecl basic_string_wchar_not_equal_cstr_str(
2378 const wchar_t *left, const basic_string_wchar *right)
2380 return basic_string_wchar_compare_cstr(right, left) != 0;
2383 /* ??$?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 */
2384 /* ??$?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 */
2385 /* ??Mstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2386 /* ??Mstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2387 MSVCP_bool __cdecl basic_string_wchar_lower(
2388 const basic_string_wchar *left, const basic_string_wchar *right)
2390 return basic_string_wchar_compare(left, right) < 0;
2393 /* ??$?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 */
2394 /* ??$?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 */
2395 /* ??Mstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2396 /* ??Mstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2397 MSVCP_bool __cdecl basic_string_wchar_lower_bstr_cstr(
2398 const basic_string_wchar *left, const wchar_t *right)
2400 return basic_string_wchar_compare_cstr(left, right) < 0;
2403 /* ??$?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 */
2404 /* ??$?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 */
2405 /* ??Mstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2406 /* ??Mstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2407 MSVCP_bool __cdecl basic_string_wchar_lower_cstr_bstr(
2408 const wchar_t *left, const basic_string_wchar *right)
2410 return basic_string_wchar_compare_cstr(right, left) > 0;
2413 /* ??$?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 */
2414 /* ??$?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 */
2415 /* ??Nstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2416 /* ??Nstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2417 MSVCP_bool __cdecl basic_string_wchar_leq(
2418 const basic_string_wchar *left, const basic_string_wchar *right)
2420 return basic_string_wchar_compare(left, right) <= 0;
2423 /* ??$?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 */
2424 /* ??$?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 */
2425 /* ??Nstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2426 /* ??Nstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2427 MSVCP_bool __cdecl basic_string_wchar_leq_bstr_cstr(
2428 const basic_string_wchar *left, const wchar_t *right)
2430 return basic_string_wchar_compare_cstr(left, right) <= 0;
2433 /* ??$?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 */
2434 /* ??$?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 */
2435 /* ??Nstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2436 /* ??Nstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2437 MSVCP_bool __cdecl basic_string_wchar_leq_cstr_bstr(
2438 const wchar_t *left, const basic_string_wchar *right)
2440 return basic_string_wchar_compare_cstr(right, left) >= 0;
2443 /* ??$?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 */
2444 /* ??$?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 */
2445 /* ??Ostd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2446 /* ??Ostd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2447 MSVCP_bool __cdecl basic_string_wchar_greater(
2448 const basic_string_wchar *left, const basic_string_wchar *right)
2450 return basic_string_wchar_compare(left, right) > 0;
2453 /* ??$?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 */
2454 /* ??$?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 */
2455 /* ??Ostd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2456 /* ??Ostd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2457 MSVCP_bool __cdecl basic_string_wchar_greater_bstr_cstr(
2458 const basic_string_wchar *left, const wchar_t *right)
2460 return basic_string_wchar_compare_cstr(left, right) > 0;
2463 /* ??$?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 */
2464 /* ??$?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 */
2465 /* ??Ostd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2466 /* ??Ostd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2467 MSVCP_bool __cdecl basic_string_wchar_greater_cstr_bstr(
2468 const wchar_t *left, const basic_string_wchar *right)
2470 return basic_string_wchar_compare_cstr(right, left) < 0;
2473 /* ??$?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 */
2474 /* ??$?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 */
2475 /* ??Pstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2476 /* ??Pstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@0@Z */
2477 MSVCP_bool __cdecl basic_string_wchar_geq(
2478 const basic_string_wchar *left, const basic_string_wchar *right)
2480 return basic_string_wchar_compare(left, right) >= 0;
2483 /* ??$?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 */
2484 /* ??$?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 */
2485 /* ??Pstd@@YA_NABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBG@Z */
2486 /* ??Pstd@@YA_NAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBG@Z */
2487 MSVCP_bool __cdecl basic_string_wchar_geq_bstr_cstr(
2488 const basic_string_wchar *left, const wchar_t *right)
2490 return basic_string_wchar_compare_cstr(left, right) >= 0;
2493 /* ??$?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 */
2494 /* ??$?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 */
2495 /* ??Pstd@@YA_NPBGABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2496 /* ??Pstd@@YA_NPEBGAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
2497 MSVCP_bool __cdecl basic_string_wchar_geq_cstr_bstr(
2498 const wchar_t *left, const basic_string_wchar *right)
2500 return basic_string_wchar_compare_cstr(right, left) <= 0;
2503 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2504 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2505 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_cstr_substr, 16)
2506 MSVCP_size_t __thiscall basic_string_wchar_find_cstr_substr(
2507 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos, MSVCP_size_t len)
2509 const wchar_t *p, *end;
2511 TRACE("%p %s %lu %lu\n", this, debugstr_w(find), pos, len);
2513 if(len==0 && pos<=this->size)
2514 return pos;
2516 end = this->ptr+this->size-len+1;
2517 for(p=this->ptr+pos; p<end; p++) {
2518 p = char_traits_wchar_find(p, end-p, find);
2519 if(!p)
2520 break;
2522 if(!char_traits_wchar_compare(p, find, len))
2523 return p-this->ptr;
2526 return basic_string_wchar_npos;
2529 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2530 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2531 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_off, 12)
2532 MSVCP_size_t __thiscall basic_string_wchar_find_off(
2533 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2535 return basic_string_wchar_find_cstr_substr(this, find->ptr, off, find->size);
2538 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2539 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2540 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_ch, 12)
2541 MSVCP_size_t __thiscall basic_string_wchar_find_ch(
2542 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t pos)
2544 return basic_string_wchar_find_cstr_substr(this, &ch, pos, 1);
2547 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2548 /* ?find@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2549 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_cstr_off, 12)
2550 MSVCP_size_t __thiscall basic_string_wchar_find_cstr_off(
2551 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos)
2553 return basic_string_wchar_find_cstr_substr(this, find, pos,
2554 char_traits_wchar_length(find));
2557 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2558 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2559 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_cstr_substr, 16)
2560 MSVCP_size_t __thiscall basic_string_wchar_rfind_cstr_substr(
2561 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos, MSVCP_size_t len)
2563 const wchar_t *p, *end;
2565 TRACE("%p %s %lu %lu\n", this, debugstr_w(find), pos, len);
2567 if(len==0)
2568 return pos<this->size ? pos : this->size;
2570 if(len > this->size)
2571 return basic_string_wchar_npos;
2573 if(pos > this->size-len+1)
2574 pos = this->size-len+1;
2575 end = this->ptr;
2576 for(p=end+pos-1; p>=end; p--) {
2577 if(*p==*find && !char_traits_wchar_compare(p, find, len))
2578 return p-this->ptr;
2581 return basic_string_wchar_npos;
2584 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2585 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2586 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_off, 12)
2587 MSVCP_size_t __thiscall basic_string_wchar_rfind_off(
2588 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2590 return basic_string_wchar_rfind_cstr_substr(this, find->ptr, off, find->size);
2593 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2594 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2595 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_ch, 12)
2596 MSVCP_size_t __thiscall basic_string_wchar_rfind_ch(
2597 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t pos)
2599 return basic_string_wchar_rfind_cstr_substr(this, &ch, pos, 1);
2602 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2603 /* ?rfind@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2604 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rfind_cstr_off, 12)
2605 MSVCP_size_t __thiscall basic_string_wchar_rfind_cstr_off(
2606 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t pos)
2608 return basic_string_wchar_rfind_cstr_substr(this, find, pos,
2609 char_traits_wchar_length(find));
2612 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2613 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2614 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of_cstr_substr, 16)
2615 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of_cstr_substr(
2616 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2618 const wchar_t *p, *end;
2620 TRACE("%p %p %lu %lu\n", this, find, off, len);
2622 if(off<this->size) {
2623 end = this->ptr+this->size;
2624 for(p=this->ptr+off; p<end; p++)
2625 if(!char_traits_wchar_find(find, len, p))
2626 return p-this->ptr;
2629 return basic_string_wchar_npos;
2632 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2633 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2634 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of, 12)
2635 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of(
2636 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2638 return basic_string_wchar_find_first_not_of_cstr_substr(this,
2639 find->ptr, off, find->size);
2642 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2643 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2644 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of_ch, 12)
2645 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of_ch(
2646 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2648 return basic_string_wchar_find_first_not_of_cstr_substr(this, &ch, off, 1);
2651 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2652 /* ?find_first_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2653 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_not_of_cstr, 12)
2654 MSVCP_size_t __thiscall basic_string_wchar_find_first_not_of_cstr(
2655 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2657 return basic_string_wchar_find_first_not_of_cstr_substr(
2658 this, find, off, char_traits_wchar_length(find));
2661 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2662 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2663 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of_cstr_substr, 16)
2664 MSVCP_size_t __thiscall basic_string_wchar_find_first_of_cstr_substr(
2665 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2667 const wchar_t *p, *end;
2669 TRACE("%p %p %lu %lu\n", this, find, off, len);
2671 if(len>0 && off<this->size) {
2672 end = this->ptr+this->size;
2673 for(p=this->ptr+off; p<end; p++)
2674 if(char_traits_wchar_find(find, len, p))
2675 return p-this->ptr;
2678 return basic_string_wchar_npos;
2681 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2682 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2683 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of, 12)
2684 MSVCP_size_t __thiscall basic_string_wchar_find_first_of(
2685 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2687 return basic_string_wchar_find_first_of_cstr_substr(this,
2688 find->ptr, off, find->size);
2691 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2692 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2693 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of_ch, 12)
2694 MSVCP_size_t __thiscall basic_string_wchar_find_first_of_ch(
2695 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2697 return basic_string_wchar_find_first_of_cstr_substr(this, &ch, off, 1);
2700 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2701 /* ?find_first_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2702 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_first_of_cstr, 12)
2703 MSVCP_size_t __thiscall basic_string_wchar_find_first_of_cstr(
2704 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2706 return basic_string_wchar_find_first_of_cstr_substr(
2707 this, find, off, char_traits_wchar_length(find));
2710 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2711 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2712 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of_cstr_substr, 16)
2713 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of_cstr_substr(
2714 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2716 const wchar_t *p, *beg;
2718 TRACE("%p %p %lu %lu\n", this, find, off, len);
2720 if(len>0 && this->size>0) {
2721 if(off >= this->size)
2722 off = this->size-1;
2724 beg = this->ptr;
2725 for(p=beg+off; p>=beg; p--)
2726 if(!char_traits_wchar_find(find, len, p))
2727 return p-beg;
2730 return basic_string_wchar_npos;
2733 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2734 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2735 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of, 12)
2736 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of(
2737 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2739 return basic_string_wchar_find_last_not_of_cstr_substr(this,
2740 find->ptr, off, find->size);
2743 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2744 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2745 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of_ch, 12)
2746 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of_ch(
2747 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2749 return basic_string_wchar_find_last_not_of_cstr_substr(this, &ch, off, 1);
2752 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2753 /* ?find_last_not_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2754 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_not_of_cstr, 12)
2755 MSVCP_size_t __thiscall basic_string_wchar_find_last_not_of_cstr(
2756 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2758 return basic_string_wchar_find_last_not_of_cstr_substr(
2759 this, find, off, char_traits_wchar_length(find));
2762 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGII@Z */
2763 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K1@Z */
2764 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of_cstr_substr, 16)
2765 MSVCP_size_t __thiscall basic_string_wchar_find_last_of_cstr_substr(
2766 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off, MSVCP_size_t len)
2768 const wchar_t *p, *beg;
2770 TRACE("%p %p %lu %lu\n", this, find, off, len);
2772 if(len>0 && this->size>0) {
2773 if(off >= this->size)
2774 off = this->size-1;
2776 beg = this->ptr;
2777 for(p=beg+off; p>=beg; p--)
2778 if(char_traits_wchar_find(find, len, p))
2779 return p-beg;
2782 return basic_string_wchar_npos;
2785 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIABV12@I@Z */
2786 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KAEBV12@_K@Z */
2787 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of, 12)
2788 MSVCP_size_t __thiscall basic_string_wchar_find_last_of(
2789 const basic_string_wchar *this, const basic_string_wchar *find, MSVCP_size_t off)
2791 return basic_string_wchar_find_last_of_cstr_substr(this,
2792 find->ptr, off, find->size);
2795 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIGI@Z */
2796 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KG_K@Z */
2797 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of_ch, 12)
2798 MSVCP_size_t __thiscall basic_string_wchar_find_last_of_ch(
2799 const basic_string_wchar *this, wchar_t ch, MSVCP_size_t off)
2801 return basic_string_wchar_find_last_of_cstr_substr(this, &ch, off, 1);
2804 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPBGI@Z */
2805 /* ?find_last_of@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEBG_K@Z */
2806 DEFINE_THISCALL_WRAPPER(basic_string_wchar_find_last_of_cstr, 12)
2807 MSVCP_size_t __thiscall basic_string_wchar_find_last_of_cstr(
2808 const basic_string_wchar *this, const wchar_t *find, MSVCP_size_t off)
2810 return basic_string_wchar_find_last_of_cstr_substr(
2811 this, find, off, char_traits_wchar_length(find));
2814 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@ABV12@II@Z */
2815 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */
2816 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_substr, 16)
2817 basic_string_wchar* __thiscall basic_string_wchar_append_substr(basic_string_wchar *this,
2818 const basic_string_wchar *append, MSVCP_size_t offset, MSVCP_size_t count)
2820 TRACE("%p %p %lu %lu\n", this, append, offset, count);
2822 if(append->size < offset)
2823 _Xran();
2825 if(count > append->size-offset)
2826 count = append->size-offset;
2828 if(basic_string_wchar_npos-this->size<=count || this->size+count<this->size)
2829 _Xlen();
2831 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2832 char_traits_wchar__Copy_s(this->ptr+this->size,
2833 this->res-this->size, append->ptr+offset, count);
2834 basic_string_wchar__Eos(this, this->size+count);
2837 return this;
2840 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBGI@Z */
2841 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG_K@Z */
2842 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_cstr_len, 12)
2843 basic_string_wchar* __thiscall basic_string_wchar_append_cstr_len(
2844 basic_string_wchar *this, const wchar_t *append, MSVCP_size_t count)
2846 TRACE("%p %s %lu\n", this, debugstr_w(append), count);
2848 if(basic_string_wchar_inside(this, append))
2849 return basic_string_wchar_append_substr(this, this, append-this->ptr, count);
2851 if(basic_string_wchar_npos-this->size<=count || this->size+count<this->size)
2852 _Xlen();
2854 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2855 char_traits_wchar__Copy_s(this->ptr+this->size,
2856 this->res-this->size, append, count);
2857 basic_string_wchar__Eos(this, this->size+count);
2860 return this;
2863 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IG@Z */
2864 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KG@Z */
2865 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_len_ch, 12)
2866 basic_string_wchar* __thiscall basic_string_wchar_append_len_ch(
2867 basic_string_wchar *this, MSVCP_size_t count, wchar_t ch)
2869 TRACE("%p %lu %c\n", this, count, ch);
2871 if(basic_string_wchar_npos-this->size <= count)
2872 _Xlen();
2874 if(basic_string_wchar__Grow(this, this->size+count, FALSE)) {
2875 char_traits_wchar_assignn(this->ptr+this->size, count, ch);
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@ABV12@@Z */
2883 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@AEBV12@@Z */
2884 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@ABV01@@Z */
2885 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@AEBV01@@Z */
2886 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append, 8)
2887 basic_string_wchar* __thiscall basic_string_wchar_append(
2888 basic_string_wchar *this, const basic_string_wchar *append)
2890 return basic_string_wchar_append_substr(this, append,
2891 0, basic_string_wchar_npos);
2894 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@G@Z */
2895 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@G@Z */
2896 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_ch, 8)
2897 basic_string_wchar* __thiscall basic_string_wchar_append_ch(
2898 basic_string_wchar *this, wchar_t ch)
2900 return basic_string_wchar_append_len_ch(this, 1, ch);
2903 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG0@Z */
2904 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG0@Z */
2905 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_beg_end, 12)
2906 basic_string_wchar* __thiscall basic_string_wchar_append_beg_end(
2907 basic_string_wchar *this, const wchar_t *beg, const wchar_t *end)
2909 return basic_string_wchar_append_cstr_len(this, beg, end-beg);
2912 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PBG@Z */
2913 /* ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEBG@Z */
2914 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV01@PBG@Z */
2915 /* ??Y?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV01@PEBG@Z */
2916 DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_cstr, 8)
2917 basic_string_wchar* __thiscall basic_string_wchar_append_cstr(
2918 basic_string_wchar *this, const wchar_t *append)
2920 return basic_string_wchar_append_cstr_len(this, append,
2921 char_traits_wchar_length(append));
2923 /* ??$?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 */
2924 /* ??$?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 */
2925 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@0@Z */
2926 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@0@Z */
2927 basic_string_wchar* __cdecl basic_string_wchar_concatenate(basic_string_wchar *ret,
2928 const basic_string_wchar *left, const basic_string_wchar *right)
2930 TRACE("%p %p\n", left, right);
2932 MSVCP_basic_string_wchar_copy_ctor(ret, left);
2933 basic_string_wchar_append(ret, right);
2934 return ret;
2937 /* ??$?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 */
2938 /* ??$?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 */
2939 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@G@Z */
2940 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@G@Z */
2941 basic_string_wchar* __cdecl basic_string_wchar_concatenate_bstr_ch(basic_string_wchar *ret,
2942 const basic_string_wchar *left, wchar_t right)
2944 TRACE("%p %c\n", left, right);
2946 MSVCP_basic_string_wchar_copy_ctor(ret, left);
2947 basic_string_wchar_append_ch(ret, right);
2948 return ret;
2951 /* ??$?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 */
2952 /* ??$?HGU?$char_traits@G@std@@V?$allocator@G@1@@std@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@PEBG@Z */
2953 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@ABV10@PBG@Z */
2954 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@AEBV10@PEBG@Z */
2955 basic_string_wchar* __cdecl basic_string_wchar_concatenate_bstr_cstr(basic_string_wchar *ret,
2956 const basic_string_wchar *left, const wchar_t *right)
2958 TRACE("%p %s\n", left, debugstr_w(right));
2960 MSVCP_basic_string_wchar_copy_ctor(ret, left);
2961 basic_string_wchar_append_cstr(ret, right);
2962 return ret;
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@GABV10@@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@GAEBV10@@Z */
2967 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GABV10@@Z */
2968 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@GAEBV10@@Z */
2969 basic_string_wchar* __cdecl basic_string_wchar_concatenate_ch_bstr(basic_string_wchar *ret,
2970 wchar_t left, const basic_string_wchar *right)
2972 TRACE("%c %p\n", left, right);
2974 basic_string_wchar_ctor_cstr_len_alloc(ret, &left, 1, NULL);
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@PBGABV10@@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@PEBGAEBV10@@Z */
2981 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PBGABV10@@Z */
2982 /* ??Hstd@@YA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@PEBGAEBV10@@Z */
2983 basic_string_wchar* __cdecl basic_string_wchar_concatenate_cstr_bstr(basic_string_wchar *ret,
2984 const wchar_t *left, const basic_string_wchar *right)
2986 TRACE("%s %p\n", debugstr_w(left), right);
2988 basic_string_wchar_ctor_cstr_alloc(ret, left, NULL);
2989 basic_string_wchar_append(ret, right);
2990 return ret;
2993 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGI@Z */
2994 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAG_K@Z */
2995 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEABGI@Z */
2996 /* ??A?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAAEBG_K@Z */
2997 DEFINE_THISCALL_WRAPPER(basic_string_wchar_operator_at, 8)
2998 wchar_t* __thiscall basic_string_wchar_operator_at(
2999 basic_string_wchar *this, MSVCP_size_t pos)
3001 TRACE("%p %lu\n", this, pos);
3003 assert(this->size >= pos);
3004 return this->ptr+pos;
3007 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAGI@Z */
3008 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAG_K@Z */
3009 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEABGI@Z */
3010 /* ?at@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAAEBG_K@Z */
3011 DEFINE_THISCALL_WRAPPER(basic_string_wchar_at, 8)
3012 wchar_t* __thiscall basic_string_wchar_at(
3013 basic_string_wchar *this, MSVCP_size_t pos)
3015 TRACE("%p %lu\n", this, pos);
3017 if(this->size <= pos)
3018 _Xran();
3020 return this->ptr+pos;
3023 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIPBGI@Z */
3024 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG0@Z */
3025 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_cstr_len, 20)
3026 basic_string_wchar* __thiscall basic_string_wchar_replace_cstr_len(basic_string_wchar *this,
3027 MSVCP_size_t off, MSVCP_size_t len, const wchar_t *str, MSVCP_size_t str_len)
3029 MSVCP_size_t inside_pos = -1;
3030 wchar_t *ptr = this->ptr;
3032 TRACE("%p %ld %ld %p %ld\n", this, off, len, str, str_len);
3034 if(this->size < off)
3035 _Xran();
3037 if(off+len > this->size)
3038 len = this->size-off;
3040 if(basic_string_wchar_npos-str_len <= this->size-len)
3041 _Xlen();
3043 if(basic_string_wchar_inside(this, str))
3044 inside_pos = str-ptr;
3046 if(this->size-len+str_len)
3047 basic_string_wchar__Grow(this, this->size-len+str_len, FALSE);
3048 ptr = this->ptr;
3050 if(inside_pos == -1) {
3051 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3052 memcpy(ptr+off, str, str_len*sizeof(char));
3053 } else if(len >= str_len) {
3054 memmove(ptr+off, ptr+inside_pos, str_len*sizeof(char));
3055 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3056 } else {
3057 MSVCP_size_t size;
3059 memmove(ptr+off+str_len, ptr+off+len, (this->size-off-len)*sizeof(char));
3061 if(inside_pos < off+len) {
3062 size = off+len-inside_pos;
3063 if(size > str_len)
3064 size = str_len;
3065 memmove(ptr+off, ptr+inside_pos, size*sizeof(char));
3066 } else {
3067 size = 0;
3070 if(str_len > size)
3071 memmove(ptr+off+size, ptr+off+str_len, (str_len-size)*sizeof(char));
3074 basic_string_wchar__Eos(this, this->size-len+str_len);
3075 return this;
3078 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@II@Z */
3079 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0AEBV12@00@Z */
3080 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_substr, 24)
3081 basic_string_wchar* __thiscall basic_string_wchar_replace_substr(basic_string_wchar *this, MSVCP_size_t off,
3082 MSVCP_size_t len, const basic_string_wchar *str, MSVCP_size_t str_off, MSVCP_size_t str_len)
3084 if(str->size < str_off)
3085 _Xran();
3087 if(str_off+str_len > str->size)
3088 str_len = str->size-str_off;
3090 return basic_string_wchar_replace_cstr_len(this, off, len,
3091 str->ptr+str_off, str_len);
3094 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIABV12@@Z */
3095 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0AEBV12@@Z */
3096 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace, 16)
3097 basic_string_wchar* __thiscall basic_string_wchar_replace(basic_string_wchar *this,
3098 MSVCP_size_t off, MSVCP_size_t len, const basic_string_wchar *str)
3100 return basic_string_wchar_replace_cstr_len(this, off, len,
3101 str->ptr, str->size);
3104 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIIG@Z */
3105 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K00G@Z */
3106 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_ch, 20)
3107 basic_string_wchar* __thiscall basic_string_wchar_replace_ch(basic_string_wchar *this,
3108 MSVCP_size_t off, MSVCP_size_t len, MSVCP_size_t count, wchar_t ch)
3110 wchar_t *ptr = this->ptr;
3112 TRACE("%p %ld %ld %ld %c\n", this, off, len, count, ch);
3114 if(this->size < off)
3115 _Xran();
3117 if(off+len > this->size)
3118 len = this->size-off;
3120 if(basic_string_wchar_npos-count <= this->size-len)
3121 _Xlen();
3123 if(this->size-len+count)
3124 basic_string_wchar__Grow(this, this->size-len+count, FALSE);
3125 ptr = this->ptr;
3127 memmove(ptr+off+count, ptr+off+len, (this->size-off-len)*sizeof(char));
3128 char_traits_wchar_assignn(ptr+off, count, ch);
3129 basic_string_wchar__Eos(this, this->size-len+count);
3131 return this;
3134 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIPBG@Z */
3135 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0PEBG@Z */
3136 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_cstr, 16)
3137 basic_string_wchar* __thiscall basic_string_wchar_replace_cstr(basic_string_wchar *this,
3138 MSVCP_size_t off, MSVCP_size_t len, const wchar_t *str)
3140 return basic_string_wchar_replace_cstr_len(this, off, len, str,
3141 char_traits_wchar_length(str));
3144 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0ABV12@@Z */
3145 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0AEBV12@@Z */
3146 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_bstr, 16)
3147 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_bstr(basic_string_wchar *this,
3148 wchar_t *beg, wchar_t *end, const basic_string_wchar *str)
3150 return basic_string_wchar_replace(this, basic_string_wchar__Pdif(beg, this->ptr),
3151 basic_string_wchar__Pdif(end, beg), str);
3154 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0IG@Z */
3155 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0_KG@Z */
3156 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_chn, 20)
3157 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_chn(basic_string_wchar *this,
3158 wchar_t *beg, wchar_t *end, MSVCP_size_t count, wchar_t ch)
3160 return basic_string_wchar_replace_ch(this, basic_string_wchar__Pdif(beg, this->ptr),
3161 basic_string_wchar__Pdif(end, beg), count, ch);
3164 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBG1@Z */
3165 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG1@Z */
3166 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_iter, 20)
3167 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_iter(basic_string_wchar *this,
3168 wchar_t *beg1, wchar_t *end1, const wchar_t *beg2, const wchar_t *end2)
3170 return basic_string_wchar_replace_cstr_len(this, basic_string_wchar__Pdif(beg1, this->ptr),
3171 basic_string_wchar__Pdif(end1, beg1), beg2, basic_string_wchar__Pdif(end2, beg2));
3174 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBG@Z */
3175 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG@Z */
3176 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr, 16)
3177 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr(basic_string_wchar *this,
3178 wchar_t *beg, wchar_t *end, const wchar_t *str)
3180 return basic_string_wchar_replace_cstr(this, basic_string_wchar__Pdif(beg, this->ptr),
3181 basic_string_wchar__Pdif(end, beg), str);
3184 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@PAG0PBGI@Z */
3185 /* ?replace@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@PEAG0PEBG_K@Z */
3186 DEFINE_THISCALL_WRAPPER(basic_string_wchar_replace_iter_cstr_len, 20)
3187 basic_string_wchar* __thiscall basic_string_wchar_replace_iter_cstr_len(basic_string_wchar *this,
3188 wchar_t *beg, wchar_t *end, const wchar_t *str, MSVCP_size_t len)
3190 return basic_string_wchar_replace_cstr_len(this, basic_string_wchar__Pdif(beg, this->ptr),
3191 basic_string_wchar__Pdif(end, beg), str, len);
3194 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IABV12@@Z */
3195 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KAEBV12@@Z */
3196 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert, 12)
3197 basic_string_wchar* __thiscall basic_string_wchar_insert(basic_string_wchar *this,
3198 MSVCP_size_t off, const basic_string_wchar *str)
3200 return basic_string_wchar_replace(this, off, 0, str);
3203 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IABV12@II@Z */
3204 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KAEBV12@00@Z */
3205 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_substr, 20)
3206 basic_string_wchar* __thiscall basic_string_wchar_insert_substr(
3207 basic_string_wchar *this, MSVCP_size_t off, const basic_string_wchar *str,
3208 MSVCP_size_t str_off, MSVCP_size_t str_count)
3210 return basic_string_wchar_replace_substr(this, off, 0, str, str_off, str_count);
3213 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IPBG@Z */
3214 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KPEBG@Z */
3215 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_cstr, 12)
3216 basic_string_wchar* __thiscall basic_string_wchar_insert_cstr(
3217 basic_string_wchar *this, MSVCP_size_t off, const wchar_t *str)
3219 return basic_string_wchar_replace_cstr(this, off, 0, str);
3222 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IPBGI@Z */
3223 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KPEBG0@Z */
3224 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_cstr_len, 16)
3225 basic_string_wchar* __thiscall basic_string_wchar_insert_cstr_len(basic_string_wchar *this,
3226 MSVCP_size_t off, const wchar_t *str, MSVCP_size_t str_len)
3228 return basic_string_wchar_replace_cstr_len(this, off, 0, str, str_len);
3231 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@IIG@Z */
3232 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_K0G@Z */
3233 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_chn, 16)
3234 basic_string_wchar* __thiscall basic_string_wchar_insert_chn(basic_string_wchar *this,
3235 MSVCP_size_t off, MSVCP_size_t count, wchar_t ch)
3237 return basic_string_wchar_replace_ch(this, off, 0, count, ch);
3240 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGPAGG@Z */
3241 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGPEAGG@Z */
3242 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter_ch, 12)
3243 wchar_t* __thiscall basic_string_wchar_insert_iter_ch(basic_string_wchar *this, wchar_t *pos, wchar_t ch)
3245 MSVCP_size_t off = basic_string_wchar__Pdif(pos, this->ptr);
3246 basic_string_wchar_insert_chn(this, off, 1, ch);
3247 return basic_string_wchar__Psum(this->ptr, off);
3250 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXPAGIG@Z */
3251 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXPEAG_KG@Z */
3252 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter_chn, 16)
3253 void __thiscall basic_string_wchar_insert_iter_chn(basic_string_wchar *this,
3254 wchar_t *pos, MSVCP_size_t n, wchar_t ch)
3256 basic_string_wchar_insert_chn(this, basic_string_wchar__Pdif(pos, this->ptr), n, ch);
3259 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXPAGPBG1@Z */
3260 /* ?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXPEAGPEBG1@Z */
3261 DEFINE_THISCALL_WRAPPER(basic_string_wchar_insert_iter, 16)
3262 void __thiscall basic_string_wchar_insert_iter(basic_string_wchar *this,
3263 wchar_t *pos, const wchar_t *beg, const wchar_t *end)
3265 basic_string_wchar_insert_cstr_len(this, basic_string_wchar__Pdif(pos, this->ptr),
3266 beg, basic_string_wchar__Pdif(end, beg));
3269 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXIG@Z */
3270 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_KG@Z */
3271 DEFINE_THISCALL_WRAPPER(basic_string_wchar_resize_ch, 12)
3272 void __thiscall basic_string_wchar_resize_ch(
3273 basic_string_wchar *this, MSVCP_size_t size, wchar_t ch)
3275 TRACE("%p %lu %c\n", this, size, ch);
3277 if(size <= this->size)
3278 basic_string_wchar_erase(this, size, this->size);
3279 else
3280 basic_string_wchar_append_len_ch(this, size-this->size, ch);
3283 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXI@Z */
3284 /* ?resize@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_K@Z */
3285 DEFINE_THISCALL_WRAPPER(basic_string_wchar_resize, 8)
3286 void __thiscall basic_string_wchar_resize(
3287 basic_string_wchar *this, MSVCP_size_t size)
3289 basic_string_wchar_resize_ch(this, size, '\0');
3292 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGXZ */
3293 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGXZ */
3294 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3295 /* ?begin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3296 DEFINE_THISCALL_WRAPPER(basic_string_wchar_begin, 4)
3297 wchar_t* __thiscall basic_string_wchar_begin(basic_string_wchar *this)
3299 TRACE("(%p)\n", this);
3300 basic_string_wchar__Freeze(this);
3301 return this->ptr;
3304 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEPAGXZ */
3305 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAPEAGXZ */
3306 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3307 /* ?end@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3308 DEFINE_THISCALL_WRAPPER(basic_string_wchar_end, 4)
3309 wchar_t* __thiscall basic_string_wchar_end(basic_string_wchar *this)
3311 TRACE("(%p)\n", this);
3312 basic_string_wchar__Freeze(this);
3313 return this->ptr+this->size;
3316 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@PAGGAAGPAGH@2@XZ */
3317 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@PEAGGAEAGPEAG_J@2@XZ */
3318 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@PBGGABGPBGH@2@XZ */
3319 /* ?rbegin@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@PEBGGAEBGPEBG_J@2@XZ */
3320 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rbegin, 8)
3321 String_reverse_iterator_wchar* __thiscall basic_string_wchar_rbegin(
3322 basic_string_wchar *this, String_reverse_iterator_wchar *ret)
3324 TRACE("(%p %p)\n", this, ret);
3325 ret->ptr = basic_string_wchar_end(this);
3326 return ret;
3329 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$reverse_iterator@PAGGAAGPAGH@2@XZ */
3330 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA?AV?$reverse_iterator@PEAGGAEAGPEAG_J@2@XZ */
3331 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$reverse_iterator@PBGGABGPBGH@2@XZ */
3332 /* ?rend@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$reverse_iterator@PEBGGAEBGPEBG_J@2@XZ */
3333 DEFINE_THISCALL_WRAPPER(basic_string_wchar_rend, 8)
3334 String_reverse_iterator_wchar* __thiscall basic_string_wchar_rend(
3335 basic_string_wchar *this, String_reverse_iterator_wchar *ret)
3337 TRACE("(%p %p)\n", this, ret);
3338 ret->ptr = basic_string_wchar_begin(this);
3339 return ret;
3342 /* ?c_str@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3343 /* ?c_str@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3344 /* ?data@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPBGXZ */
3345 /* ?data@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEBGXZ */
3346 DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_c_str, 4)
3347 const wchar_t* __thiscall MSVCP_basic_string_wchar_c_str(const basic_string_wchar *this)
3349 TRACE("%p\n", this);
3350 return this->ptr;
3353 /* ?size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3354 /* ?size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3355 /* ?length@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3356 /* ?length@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3357 DEFINE_THISCALL_WRAPPER(basic_string_wchar_length, 4)
3358 MSVCP_size_t __thiscall basic_string_wchar_length(basic_string_wchar *this)
3360 TRACE("%p\n", this);
3361 return this->size;
3364 /* ?max_size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3365 /* ?max_size@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3366 DEFINE_THISCALL_WRAPPER(basic_string_wchar_max_size, 4)
3367 MSVCP_size_t __thiscall basic_string_wchar_max_size(const basic_string_wchar *this)
3369 TRACE("%p\n", this);
3370 return MSVCP_allocator_wchar_max_size(NULL)-1;
3373 /* ?capacity@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIXZ */
3374 /* ?capacity@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KXZ */
3375 DEFINE_THISCALL_WRAPPER(basic_string_wchar_capacity, 4)
3376 MSVCP_size_t __thiscall basic_string_wchar_capacity(basic_string_wchar *this)
3378 TRACE("%p\n", this);
3379 return this->res;
3382 /* ?reserve@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXI@Z */
3383 /* ?reserve@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAX_K@Z */
3384 DEFINE_THISCALL_WRAPPER(basic_string_wchar_reserve, 8)
3385 void __thiscall basic_string_wchar_reserve(basic_string_wchar *this, MSVCP_size_t size)
3387 MSVCP_size_t len;
3389 TRACE("%p %ld\n", this, size);
3391 len = this->size;
3392 if(len > size)
3393 return;
3395 basic_string_wchar__Grow(this, size, FALSE);
3396 basic_string_wchar__Eos(this, len);
3399 /* ?empty@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE_NXZ */
3400 /* ?empty@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_NXZ */
3401 DEFINE_THISCALL_WRAPPER(basic_string_wchar_empty, 4)
3402 MSVCP_bool __thiscall basic_string_wchar_empty(basic_string_wchar *this)
3404 TRACE("%p\n", this);
3405 return this->size == 0;
3408 /* ?swap@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXAAV12@@Z */
3409 /* ?swap@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXAEAV12@@Z */
3410 DEFINE_THISCALL_WRAPPER(basic_string_wchar_swap, 8)
3411 void __thiscall basic_string_wchar_swap(basic_string_wchar *this, basic_string_wchar *str)
3413 basic_string_wchar tmp;
3414 TRACE("%p %p\n", this, str);
3416 tmp = *this;
3417 *this = *str;
3418 *str = tmp;
3421 /* ?substr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV12@II@Z */
3422 /* ?substr@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV12@_K0@Z */
3423 DEFINE_THISCALL_WRAPPER(basic_string_wchar_substr, 16)
3424 basic_string_wchar* __thiscall basic_string_wchar_substr(basic_string_wchar *this,
3425 basic_string_wchar *ret, MSVCP_size_t off, MSVCP_size_t len)
3427 TRACE("%p %lu %lu\n", this, off, len);
3429 basic_string_wchar_ctor_substr_alloc(ret, this, off, len, NULL);
3430 return ret;
3433 /* ?copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEIPAGII@Z */
3434 /* ?copy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA_KPEAG_K1@Z */
3435 DEFINE_THISCALL_WRAPPER(basic_string_wchar_copy, 16)
3436 MSVCP_size_t __thiscall basic_string_wchar_copy(const basic_string_wchar *this,
3437 wchar_t *dest, MSVCP_size_t count, MSVCP_size_t off)
3439 TRACE("%p %p %lu %lu\n", this, dest, count, off);
3441 if(off > this->size)
3442 _Xran();
3443 if(count > this->size-off)
3444 count = this->size-off;
3445 char_traits_wchar__Copy_s(dest, count, this->ptr+off, count);
3446 return count;
3449 /* ?get_allocator@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$allocator@G@2@XZ */
3450 /* ?get_allocator@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$allocator@G@2@XZ */
3451 DEFINE_THISCALL_WRAPPER(basic_string_wchar_get_allocator, 8)
3452 allocator* __thiscall basic_string_wchar_get_allocator(const basic_string_wchar *this, allocator *ret)
3454 TRACE("%p\n", this);
3455 return ret;