This file is indexed.

/usr/include/wx-3.0/wx/ustring.h is in wx3.0-headers 3.0.2-1+b1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
// Name:        wx/ustring.h
// Purpose:     32-bit string (UCS-4)
// Author:      Robert Roebling
// Copyright:   (c) Robert Roebling
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////

#ifndef _WX_USTRING_H_
#define _WX_USTRING_H_

#include "wx/defs.h"
#include "wx/string.h"

#include <string>

#if SIZEOF_WCHAR_T == 2
typedef wxWCharBuffer wxU16CharBuffer;
typedef wxScopedWCharBuffer wxScopedU16CharBuffer;
#else
typedef wxCharTypeBuffer<wxChar16> wxU16CharBuffer;
typedef wxScopedCharTypeBuffer<wxChar16> wxScopedU16CharBuffer;
#endif

#if SIZEOF_WCHAR_T == 4
typedef wxWCharBuffer wxU32CharBuffer;
typedef wxScopedWCharBuffer wxScopedU32CharBuffer;
#else
typedef wxCharTypeBuffer<wxChar32> wxU32CharBuffer;
typedef wxScopedCharTypeBuffer<wxChar32> wxScopedU32CharBuffer;
#endif

#ifdef __VISUALC__
    // "non dll-interface class 'std::basic_string<wxChar32>' used as base
    // interface for dll-interface class 'wxString'" -- this is OK in our case
    // (and warning is unavoidable anyhow)
    #pragma warning(push)
    #pragma warning(disable:4275)
#endif

class WXDLLIMPEXP_BASE wxUString: public std::basic_string<wxChar32>
{
public:
    wxUString() { }

    wxUString( const wxChar32 *str )                            { assign(str); }
    wxUString( const wxScopedU32CharBuffer &buf )                     { assign(buf); }

    wxUString( const char *str )                                { assign(str); }
    wxUString( const wxScopedCharBuffer &buf )                        { assign(buf); }
    wxUString( const char *str, const wxMBConv &conv )          { assign(str,conv); }
    wxUString( const wxScopedCharBuffer &buf, const wxMBConv &conv )  { assign(buf,conv); }

    wxUString( const wxChar16 *str )                            { assign(str); }
    wxUString( const wxScopedU16CharBuffer &buf )                     { assign(buf); }

    wxUString( const wxCStrData *cstr )                         { assign(cstr); }
    wxUString( const wxString &str )                            { assign(str); }

    wxUString( char ch )                                        { assign(ch); }
    wxUString( wxChar16 ch )                                    { assign(ch); }
    wxUString( wxChar32 ch )                                    { assign(ch); }
    wxUString( wxUniChar ch )                                   { assign(ch); }
    wxUString( wxUniCharRef ch )                                { assign(ch); }
    wxUString( size_type n, char ch )                           { assign(n,ch); }
    wxUString( size_type n, wxChar16 ch )                       { assign(n,ch); }
    wxUString( size_type n, wxChar32 ch )                       { assign(n,ch); }
    wxUString( size_type n, wxUniChar ch )                      { assign(n,ch); }
    wxUString( size_type n, wxUniCharRef ch )                   { assign(n,ch); }

    // static construction

    static wxUString FromAscii( const char *str, size_type n )
    {
        wxUString ret;
        ret.assignFromAscii( str, n );
        return ret;
    }

    static wxUString FromAscii( const char *str )
    {
        wxUString ret;
        ret.assignFromAscii( str );
        return ret;
    }

    static wxUString FromUTF8( const char *str, size_type n )
    {
        wxUString ret;
        ret.assignFromUTF8( str, n );
        return ret;
    }

    static wxUString FromUTF8( const char *str )
    {
        wxUString ret;
        ret.assignFromUTF8( str );
        return ret;
    }

    static wxUString FromUTF16( const wxChar16 *str, size_type n )
    {
        wxUString ret;
        ret.assignFromUTF16( str, n );
        return ret;
    }

    static wxUString FromUTF16( const wxChar16 *str )
    {
        wxUString ret;
        ret.assignFromUTF16( str );
        return ret;
    }

    // assign from encoding

    wxUString &assignFromAscii( const char *str );
    wxUString &assignFromAscii( const char *str, size_type n );
    wxUString &assignFromUTF8( const char *str );
    wxUString &assignFromUTF8( const char *str, size_type n );
    wxUString &assignFromUTF16( const wxChar16* str );
    wxUString &assignFromUTF16( const wxChar16* str, size_type n );
    wxUString &assignFromCString( const char* str );
    wxUString &assignFromCString( const char* str, const wxMBConv &conv );

    // conversions

    wxScopedCharBuffer utf8_str() const;
    wxScopedU16CharBuffer utf16_str() const;

#if SIZEOF_WCHAR_T == 2
    wxScopedWCharBuffer wc_str() const
    {
       return utf16_str();
    }
#else
    wchar_t *wc_str() const
    {
        return (wchar_t*) c_str();
    }
#endif

    operator wxString() const
    {
#if wxUSE_UNICODE_UTF8
        return wxString::FromUTF8( utf8_str() );
#else
#if SIZEOF_WCHAR_T == 2
        return wxString( utf16_str() );
#else
        return wxString( c_str() );
#endif
#endif
    }

#if wxUSE_UNICODE_UTF8
    wxScopedCharBuffer wx_str()
    {
        return utf8_str();
    }
#else
#if SIZEOF_WCHAR_T == 2
    wxScopedWCharBuffer wx_str()
    {
        return utf16_str();
    }
#else
    const wchar_t* wx_str()
    {
        return c_str();
    }
#endif
#endif

    // assign

    wxUString &assign( const wxChar32* str )
    {
        std::basic_string<wxChar32> *base = this;
        return (wxUString &) base->assign( str );
    }

    wxUString &assign( const wxChar32* str, size_type n )
    {
        std::basic_string<wxChar32> *base = this;
        return (wxUString &) base->assign( str, n );
    }

    wxUString &assign( const wxUString &str )
    {
        std::basic_string<wxChar32> *base = this;
        return (wxUString &) base->assign( str );
    }

    wxUString &assign( const wxUString &str, size_type pos, size_type n )
    {
        std::basic_string<wxChar32> *base = this;
        return (wxUString &) base->assign( str, pos, n );
    }

    // FIXME-VC6:  VC 6.0 stl does not support all types of assign functions
    #ifdef __VISUALC6__
        wxUString &assign( wxChar32 ch )
        {
            wxChar32 chh[1];
            chh[0] = ch;
            std::basic_string<wxChar32> *base = this;
            return (wxUString &)base->assign(chh);
        }

        wxUString &assign( size_type n, wxChar32 ch )
        {
            wxU32CharBuffer buffer(n);
            wxChar32 *p = buffer.data();
            size_type i;
            for (i = 0; i < n; i++)
            {
               *p = ch;
               p++;
            }

            std::basic_string<wxChar32> *base = this;
            return (wxUString &)base->assign(buffer.data());
        }
    #else
        wxUString &assign( wxChar32 ch )
        {
            std::basic_string<wxChar32> *base = this;
            return (wxUString &) base->assign( (size_type) 1, ch );
        }

        wxUString &assign( size_type n, wxChar32 ch )
        {
            std::basic_string<wxChar32> *base = this;
            return (wxUString &) base->assign( n, ch );
        }
    #endif // __VISUALC6__

    wxUString &assign( const wxScopedU32CharBuffer &buf )
    {
        return assign( buf.data() );
    }

    wxUString &assign( const char *str )
    {
        return assignFromCString( str );
    }

    wxUString &assign( const wxScopedCharBuffer &buf )
    {
        return assignFromCString( buf.data() );
    }

    wxUString &assign( const char *str, const wxMBConv &conv )
    {
        return assignFromCString( str, conv );
    }

    wxUString &assign( const wxScopedCharBuffer &buf, const wxMBConv &conv )
    {
        return assignFromCString( buf.data(), conv );
    }

    wxUString &assign( const wxChar16 *str )
    {
        return assignFromUTF16( str );
    }

    wxUString &assign( const wxScopedU16CharBuffer &buf )
    {
        return assignFromUTF16( buf.data() );
    }

    wxUString &assign( const wxCStrData *cstr )
    {
#if SIZEOF_WCHAR_T == 2
        return assignFromUTF16( cstr->AsWChar() );
#else
        return assign( cstr->AsWChar() );
#endif
    }

    wxUString &assign( const wxString &str )
    {
#if wxUSE_UNICODE_UTF8
        return assignFromUTF8( str.wx_str() );
#else
   #if SIZEOF_WCHAR_T == 2
        return assignFromUTF16( str.wc_str() );
   #else
        return assign( str.wc_str() );
   #endif
#endif
    }

    wxUString &assign( char ch )
    {
        char buf[2];
        buf[0] = ch;
        buf[1] = 0;
        return assignFromCString( buf );
    }

    wxUString &assign( size_type n, char ch )
    {
        wxCharBuffer buffer(n);
        char *p = buffer.data();
        size_type i;
        for (i = 0; i < n; i++)
        {
           *p = ch;
           p++;
        }
        return assignFromCString( buffer.data() );
    }

    wxUString &assign( wxChar16 ch )
    {
        wxChar16 buf[2];
        buf[0] = ch;
        buf[1] = 0;
        return assignFromUTF16( buf );
    }

    wxUString &assign( size_type n, wxChar16 ch )
    {
        wxU16CharBuffer buffer(n);
        wxChar16 *p = buffer.data();
        size_type i;
        for (i = 0; i < n; i++)
        {
           *p = ch;
           p++;
        }
        return assignFromUTF16( buffer.data() );
    }

    wxUString &assign( wxUniChar ch )
    {
        return assign( (wxChar32) ch.GetValue() );
    }

    wxUString &assign( size_type n, wxUniChar ch )
    {
        return assign( n, (wxChar32) ch.GetValue() );
    }

    wxUString &assign( wxUniCharRef ch )
    {
        return assign( (wxChar32) ch.GetValue() );
    }

    wxUString &assign( size_type n, wxUniCharRef ch )
    {
        return assign( n, (wxChar32) ch.GetValue() );
    }

    // append [STL overload]

    wxUString &append( const wxUString &s )
    {
        std::basic_string<wxChar32> *base = this;
        return (wxUString &) base->append( s );
    }

    wxUString &append( const wxUString &s, size_type pos, size_type n )
    {
        std::basic_string<wxChar32> *base = this;
        return (wxUString &) base->append( s, pos, n );
    }

    wxUString &append( const wxChar32* s )
    {
        std::basic_string<wxChar32> *base = this;
        return (wxUString &) base->append( s );
    }

    wxUString &append( const wxChar32* s, size_type n )
    {
        std::basic_string<wxChar32> *base = this;
        return (wxUString &) base->append( s, n );
    }

    // FIXME-VC6:  VC 6.0 stl does not support all types of append functions
    #ifdef __VISUALC6__
        wxUString &append( size_type n, wxChar32 c )
        {
            wxU32CharBuffer buffer(n);
            wxChar32 *p = buffer.data();
            size_type i;
            for (i = 0; i < n; i++)
            {
               *p = c;
               p++;
            }

            std::basic_string<wxChar32> *base = this;
            return (wxUString &) base->append(buffer.data());
        }
    #else
        wxUString &append( size_type n, wxChar32 c )
        {
            std::basic_string<wxChar32> *base = this;
            return (wxUString &) base->append( n, c );
        }
    #endif // __VISUALC6__

    wxUString &append( wxChar32 c )
    {
        std::basic_string<wxChar32> *base = this;
        return (wxUString &) base->append( 1, c );
    }

    // append [wx overload]

    wxUString &append( const wxScopedU16CharBuffer &buf )
    {
        return append( buf.data() );
    }

    wxUString &append( const wxScopedU32CharBuffer &buf )
    {
        return append( buf.data() );
    }

    wxUString &append( const char *str )
    {
        return append( wxUString( str ) );
    }

    wxUString &append( const wxScopedCharBuffer &buf )
    {
        return append( wxUString( buf ) );
    }

    wxUString &append( const wxChar16 *str )
    {
        return append( wxUString( str ) );
    }

    wxUString &append( const wxString &str )
    {
        return append( wxUString( str ) );
    }

    wxUString &append( const wxCStrData *cstr )
    {
        return append( wxUString( cstr ) );
    }

    wxUString &append( char ch )
    {
        char buf[2];
        buf[0] = ch;
        buf[1] = 0;
        return append( buf );
    }

    wxUString &append( wxChar16 ch )
    {
        wxChar16 buf[2];
        buf[0] = ch;
        buf[1] = 0;
        return append( buf );
    }

    wxUString &append( wxUniChar ch )
    {
        return append( (size_type) 1, (wxChar32) ch.GetValue() );
    }

    wxUString &append( wxUniCharRef ch )
    {
        return append( (size_type) 1, (wxChar32) ch.GetValue() );
    }


    // insert [STL overloads]

    wxUString &insert( size_type pos, const wxUString &s )
    {
        std::basic_string<wxChar32> *base = this;
        return (wxUString &) base->insert( pos, s );
    }

    wxUString &insert( size_type pos, const wxUString &s, size_type pos1, size_type n )
    {
        std::basic_string<wxChar32> *base = this;
        return (wxUString &) base->insert( pos, s, pos1, n );
    }

    wxUString &insert( size_type pos, const wxChar32 *s )
    {
        std::basic_string<wxChar32> *base = this;
        return (wxUString &) base->insert( pos, s );
    }

    wxUString &insert( size_type pos, const wxChar32 *s, size_type n )
    {
        std::basic_string<wxChar32> *base = this;
        return (wxUString &) base->insert( pos, s, n );
    }

    wxUString &insert( size_type pos, size_type n, wxChar32 c )
    {
        std::basic_string<wxChar32> *base = this;
        return (wxUString &) base->insert( pos, n, c );
    }


    // insert [STL overloads]

    wxUString &insert( size_type n, const char *s )
    {
        return insert( n, wxUString( s ) );
    }

    wxUString &insert( size_type n, const wxChar16 *s )
    {
        return insert( n, wxUString( s ) );
    }

    wxUString &insert( size_type n, const wxScopedCharBuffer &buf )
    {
        return insert( n, wxUString( buf ) );
    }

    wxUString &insert( size_type n, const wxScopedU16CharBuffer &buf )
    {
        return insert( n, wxUString( buf ) );
    }

    wxUString &insert( size_type n, const wxScopedU32CharBuffer &buf )
    {
        return insert( n, buf.data() );
    }

    wxUString &insert( size_type n, const wxString &s )
    {
        return insert( n, wxUString( s ) );
    }

    wxUString &insert( size_type n, const wxCStrData *cstr )
    {
        return insert( n, wxUString( cstr ) );
    }

    wxUString &insert( size_type n, char ch )
    {
        char buf[2];
        buf[0] = ch;
        buf[1] = 0;
        return insert( n, buf );
    }

    wxUString &insert( size_type n, wchar_t ch )
    {
        wchar_t buf[2];
        buf[0] = ch;
        buf[1] = 0;
        return insert( n, buf );
    }

    // insert iterator

    iterator insert( iterator it, wxChar32 ch )
    {
        std::basic_string<wxChar32> *base = this;
        return base->insert( it, ch );
    }

    void insert(iterator it, const_iterator first, const_iterator last)
    {
        std::basic_string<wxChar32> *base = this;
        base->insert( it, first, last );
    }


    // operator =
    wxUString& operator=(const wxString& s)
        { return assign( s ); }
    wxUString& operator=(const wxCStrData* s)
        { return assign( s ); }
    wxUString& operator=(const char *s)
        { return assign( s ); }
    wxUString& operator=(const wxChar16 *s)
        { return assign( s ); }
    wxUString& operator=(const wxChar32 *s)
        { return assign( s ); }
    wxUString& operator=(const wxScopedCharBuffer &s)
        { return assign( s ); }
    wxUString& operator=(const wxScopedU16CharBuffer &s)
        { return assign( s ); }
    wxUString& operator=(const wxScopedU32CharBuffer &s)
        { return assign( s ); }
    wxUString& operator=(const char ch)
        { return assign( ch ); }
    wxUString& operator=(const wxChar16 ch)
        { return assign( ch ); }
    wxUString& operator=(const wxChar32 ch)
        { return assign( ch ); }
    wxUString& operator=(const wxUniChar ch)
        { return assign( ch ); }
    wxUString& operator=(const wxUniCharRef ch)
        { return assign( ch ); }

    // operator +=
    wxUString& operator+=(const wxUString& s)
        { return append( s ); }
    wxUString& operator+=(const wxString& s)
        { return append( s ); }
    wxUString& operator+=(const wxCStrData* s)
        { return append( s ); }
    wxUString& operator+=(const char *s)
        { return append( s ); }
    wxUString& operator+=(const wxChar16 *s)
        { return append( s ); }
    wxUString& operator+=(const wxChar32 *s)
        { return append( s ); }
    wxUString& operator+=(const wxScopedCharBuffer &s)
        { return append( s ); }
    wxUString& operator+=(const wxScopedU16CharBuffer &s)
        { return append( s ); }
    wxUString& operator+=(const wxScopedU32CharBuffer &s)
        { return append( s ); }
    wxUString& operator+=(const char ch)
        { return append( ch ); }
    wxUString& operator+=(const wxChar16 ch)
        { return append( ch ); }
    wxUString& operator+=(const wxChar32 ch)
        { return append( ch ); }
    wxUString& operator+=(const wxUniChar ch)
        { return append( ch ); }
    wxUString& operator+=(const wxUniCharRef ch)
        { return append( ch ); }

};

#ifdef __VISUALC__
    #pragma warning(pop)
#endif

inline wxUString operator+(const wxUString &s1, const wxUString &s2)
    { wxUString ret( s1 ); ret.append( s2 ); return ret; }
inline wxUString operator+(const wxUString &s1, const char *s2)
    { return s1 + wxUString(s2); }
inline wxUString operator+(const wxUString &s1, const wxString &s2)
    { return s1 + wxUString(s2); }
inline wxUString operator+(const wxUString &s1, const wxCStrData *s2)
    { return s1 + wxUString(s2); }
inline wxUString operator+(const wxUString &s1, const wxChar16* s2)
    { return s1 + wxUString(s2); }
inline wxUString operator+(const wxUString &s1, const wxChar32 *s2)
    { return s1 + wxUString(s2); }
inline wxUString operator+(const wxUString &s1, const wxScopedCharBuffer &s2)
    { return s1 + wxUString(s2); }
inline wxUString operator+(const wxUString &s1, const wxScopedU16CharBuffer &s2)
    { return s1 + wxUString(s2); }
inline wxUString operator+(const wxUString &s1, const wxScopedU32CharBuffer &s2)
    { return s1 + wxUString(s2); }
inline wxUString operator+(const wxUString &s1, char s2)
    { return s1 + wxUString(s2); }
inline wxUString operator+(const wxUString &s1, wxChar32 s2)
    { wxUString ret( s1 ); ret.append( s2 ); return ret; }
inline wxUString operator+(const wxUString &s1, wxChar16 s2)
    { wxUString ret( s1 ); ret.append( (wxChar32) s2 ); return ret; }
inline wxUString operator+(const wxUString &s1, wxUniChar s2)
    { wxUString ret( s1 ); ret.append( (wxChar32) s2.GetValue() ); return ret; }
inline wxUString operator+(const wxUString &s1, wxUniCharRef s2)
    { wxUString ret( s1 ); ret.append( (wxChar32) s2.GetValue() ); return ret; }

inline wxUString operator+(const char *s1, const wxUString &s2)
    { return wxUString(s1) + s2; }
inline wxUString operator+(const wxString &s1, const wxUString &s2)
    { return wxUString(s1) + s2; }
inline wxUString operator+(const wxCStrData *s1, const wxUString &s2)
    { return wxUString(s1) + s2; }
inline wxUString operator+(const wxChar16* s1, const wxUString &s2)
    { return wxUString(s1) + s2; }
inline wxUString operator+(const wxChar32 *s1, const wxUString &s2)
    { return wxUString(s1) + s2; }
inline wxUString operator+(const wxScopedCharBuffer &s1, const wxUString &s2)
    { return wxUString(s1) + s2; }
inline wxUString operator+(const wxScopedU16CharBuffer &s1, const wxUString &s2)
    { return wxUString(s1) + s2; }
inline wxUString operator+(const wxScopedU32CharBuffer &s1, const wxUString &s2)
    { return wxUString(s1) + s2; }
inline wxUString operator+(char s1, const wxUString &s2)
    { return wxUString(s1) + s2; }
inline wxUString operator+(wxChar32 s1, const wxUString &s2 )
    { return wxUString(s1) + s2; }
inline wxUString operator+(wxChar16 s1, const wxUString &s2)
    { return wxUString(s1) + s2; }
inline wxUString operator+(wxUniChar s1, const wxUString &s2)
    { return wxUString(s1) + s2; }
inline wxUString operator+(wxUniCharRef s1, const wxUString &s2)
    { return wxUString(s1) + s2; }


inline bool operator==(const wxUString& s1, const wxUString& s2)
    { return s1.compare( s2 ) == 0; }
inline bool operator!=(const wxUString& s1, const wxUString& s2)
    { return s1.compare( s2 ) != 0; }
inline bool operator< (const wxUString& s1, const wxUString& s2)
    { return s1.compare( s2 ) < 0; }
inline bool operator> (const wxUString& s1, const wxUString& s2)
    { return s1.compare( s2 ) > 0; }
inline bool operator<=(const wxUString& s1, const wxUString& s2)
    { return s1.compare( s2 ) <= 0; }
inline bool operator>=(const wxUString& s1, const wxUString& s2)
    { return s1.compare( s2 ) >= 0; }

#define wxUSTRING_COMP_OPERATORS( T )                       \
inline bool operator==(const wxUString& s1, T s2)           \
    { return s1.compare( wxUString(s2) ) == 0; }            \
inline bool operator!=(const wxUString& s1, T s2)           \
    { return s1.compare( wxUString(s2) ) != 0; }            \
inline bool operator< (const wxUString& s1, T s2)           \
    { return s1.compare( wxUString(s2) ) < 0; }             \
inline bool operator> (const wxUString& s1, T s2)           \
    { return s1.compare( wxUString(s2) ) > 0; }             \
inline bool operator<=(const wxUString& s1, T s2)           \
    { return s1.compare( wxUString(s2) ) <= 0; }            \
inline bool operator>=(const wxUString& s1, T s2)           \
    { return s1.compare( wxUString(s2) ) >= 0; }            \
\
inline bool operator==(T s2, const wxUString& s1)           \
    { return s1.compare( wxUString(s2) ) == 0; }            \
inline bool operator!=(T s2, const wxUString& s1)           \
    { return s1.compare( wxUString(s2) ) != 0; }            \
inline bool operator< (T s2, const wxUString& s1)           \
    { return s1.compare( wxUString(s2) ) > 0; }             \
inline bool operator> (T s2, const wxUString& s1)           \
    { return s1.compare( wxUString(s2) ) < 0; }             \
inline bool operator<=(T s2, const wxUString& s1)           \
    { return s1.compare( wxUString(s2) ) >= 0; }            \
inline bool operator>=(T s2, const wxUString& s1)           \
    { return s1.compare( wxUString(s2) ) <= 0; }

wxUSTRING_COMP_OPERATORS( const wxString & )
wxUSTRING_COMP_OPERATORS( const char * )
wxUSTRING_COMP_OPERATORS( const wxChar16 * )
wxUSTRING_COMP_OPERATORS( const wxChar32 * )
wxUSTRING_COMP_OPERATORS( const wxScopedCharBuffer & )
wxUSTRING_COMP_OPERATORS( const wxScopedU16CharBuffer & )
wxUSTRING_COMP_OPERATORS( const wxScopedU32CharBuffer & )
wxUSTRING_COMP_OPERATORS( const wxCStrData * )

#endif // _WX_USTRING_H_