CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
FxString.h
Go to the documentation of this file.
1//
2// (C) Copyright 2005-2025 by Graebert GmbH.
3//
4// Permission to use, copy, modify, and distribute this software in
5// object code form for any purpose and without fee is hereby granted,
6// provided that the above copyright notice appears in all copies and
7// that both that copyright notice and the limited warranty and
8// restricted rights notice below appear in all supporting
9// documentation.
10//
11// GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12// GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15// UNINTERRUPTED OR ERROR FREE.
16
17#pragma once
18
19#include <OdPlatformSettings.h>
20
21#include "FxPragmaPush.h"
22
23#include "DDKERNEL.h"
24
25#include <OdString.h>
26
27#include <vector>
28
29namespace Wt
30{
31 class WString;
32}
33
34class QString;
35
36class CFxString;
37typedef std::vector<CFxString> CFxStringArray;
38typedef std::string CFxAnsiStringClass;
39
40class CFxStringPrivate;
41
50 {
51public:
52
53 friend class CFxStringPrivate;
54
59
63 CFxString( const CFxString& stringSrc );
64
68 CFxString( CFxString&& stringSrc );
69
73 CFxString( const OdString& stringSrc );
74 CFxString( const OdString& stringSrc, unsigned int codePage );
75
79 CFxString( const QString& stringSrc );
80 CFxString( const QString& stringSrc, unsigned int codePage );
81
85 CFxString( const Wt::WString& stringSrc );
86 CFxString( const Wt::WString& stringSrc, unsigned int codePage );
87
91 CFxString( const OdAnsiString& stringSrc );
92 CFxString( const OdAnsiString& stringSrc, unsigned int codePage );
93
97 CFxString( char ch, int nRepeat );
98 CFxString( char ch, int nRepeat, unsigned int codePage );
99
103 // no default conversion from ASCII string.
104 //CFxString( const char* lpsz, unsigned int codePage = CP_ACP );
105
109 CFxString( OdChar ch, int nRepeat );
110 CFxString( OdChar ch, int nRepeat, unsigned int codePage );
111#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
112 CFxString( __wchar_t ch, int nRepeat );
113 CFxString( __wchar_t ch, int nRepeat, unsigned int codePage );
114#endif
115
119 CFxString( const OdChar* lpsz );
120 CFxString( const OdChar* lpsz, unsigned int codePage );
121#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
122 CFxString( const __wchar_t* lpsz);
123 CFxString( const __wchar_t* lpsz, unsigned int codePage );
124#endif
127
131 int getAllocLength() const;
132
136 int getLength() const;
137
145 bool isNull() const;
146
150 bool isEmpty() const;
151
155 void clear();
156
160 char getAtA( int nIndex ) const;
161
165#if defined (_NATIVE_WCHAR_T_DEFINED)
166#define getAtW getAtWW
167#else
168#define getAtW getAtWU
169#endif
170#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
171 __wchar_t getAtWW( int nIndex ) const;
172#else
173#define getAtWW getAtWU
174#endif
175 OdChar getAtWU( int nIndex ) const;
176
180 void setAtA( int nIndex, char ch );
181
185#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
186 void setAtW( int nIndex, __wchar_t ch );
187#endif
188 void setAtW( int nIndex, OdChar ch );
189
193 const char* ansi_str() const;
194 static CFxString from_ansi_str(const char* data);
196
198 static CFxString from_utf8_str(const char* data);
200
201
205#if defined (_NATIVE_WCHAR_T_DEFINED)
206#define wide_str wide_strW
207#else
208#ifdef _MSC_VER
209#define wide_str wide_strU
210#else
211#define wide_str wide_strW
212#endif //_MSC_VER
213#endif
214#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
215 const __wchar_t* wide_strW() const;
216#else
217#define wide_strW wide_strU
218#endif
219 const OdChar* wide_strU() const;
220
225#if defined (_NATIVE_WCHAR_T_DEFINED)
226 inline operator LPCWSTR() const { return wide_strW();}
227#else
228 #ifdef _MSC_VER
229 inline operator LPCWSTR() const { return wide_strU();}
230 #else
231 inline operator const wchar_t *() const { return wide_strW();}
232 #endif //_MSC_VER
233#endif
234
238// operator const OdAnsiString&() const;
239
243 operator OdString() const;
244
248 operator const QString&() const;
249
253 operator const Wt::WString&() const;
254
258 const CFxString& operator=( const CFxString& stringSrc );
259
264
268 const CFxString& operator=( const OdAnsiString& stringSrc );
269
273 const CFxString& operator=( const OdString& stringSrc );
274
278 const CFxString& operator=( char ch );
279
283#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
284 const CFxString& operator=( __wchar_t ch );
285#endif
287
291 const CFxString& operator=( const char* lpsz );
292
296#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
297 const CFxString& operator=( const __wchar_t* lpsz );
298#endif
299 const CFxString& operator=( const OdChar* lpsz );
300
308 const CFxString& operator+=( const CFxString& stringSrc );
309
317 const CFxString& operator+=( char ch );
318
326#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
327 const CFxString& operator+=( __wchar_t ch );
328#endif
330
338 const CFxString& operator+=( const char* lpsz );
339
347#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
348 const CFxString& operator+=( const __wchar_t* lpsz );
349#endif
350 const CFxString& operator+=( const OdChar* lpsz );
351 const CFxString& operator+=( const OdString& str );
352
353 friend DDKERNEL_API CFxString operator+( const CFxString& string1, const CFxString& string2 );
354 friend DDKERNEL_API CFxString operator+( const CFxString& stringSrc, char ch );
355#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
356 friend DDKERNEL_API CFxString operator+( const CFxString& stringSrc, __wchar_t ch );
357#endif
358 friend DDKERNEL_API CFxString operator+( const CFxString& stringSrc, OdChar ch );
359
360 // no automatic conversion from ASCII
361 //friend DDKERNEL_API CFxString operator+( char ch, const CFxString& stringSrc );
362#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
363 friend DDKERNEL_API CFxString operator+( __wchar_t ch, const CFxString& stringSrc );
364#endif
365 friend DDKERNEL_API CFxString operator+( OdChar ch, const CFxString& stringSrc );
366 friend DDKERNEL_API CFxString operator+( const CFxString& stringSrc, const char* lpsz );
367#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
368 friend DDKERNEL_API CFxString operator+( const CFxString& stringSrc, const __wchar_t* lpsz );
369#endif
370 friend DDKERNEL_API CFxString operator+( const CFxString& stringSrc, const OdChar* lpsz );
371
372 // no automatic conversion from ASCII
373 //friend DDKERNEL_API CFxString operator+( const char* lpsz, const CFxString& stringSrc );
374#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
375 friend DDKERNEL_API CFxString operator+( const __wchar_t* lpsz, const CFxString& stringSrc );
376#endif
377 friend DDKERNEL_API CFxString operator+( const OdChar* lpsz, const CFxString& stringSrc );
378
384 int compareA( const char* lpsz ) const;
385
391#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
392 int compare( const __wchar_t* lpsz ) const;
393#endif
394 int compare( const OdChar* lpsz ) const;
395 int compare( const CFxString & lpsz ) const;
396
399 int compareNoCaseA( const char *lpsz ) const;
400
403#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
404 int compareNoCase( const __wchar_t *lpsz ) const;
405#endif
406 int compareNoCase( const OdChar *lpsz ) const;
407
410 int compareNoCase(const CFxString & stringSrc) const;
411
415 bool equalNoCase( const OdChar* lpsz ) const;
416#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
417 bool equalNoCase( const __wchar_t* lpsz ) const;
418#endif
419
423 bool equalNoCase(const CFxString & stringSrc) const;
424
425
429#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
430 bool startsWith(const __wchar_t * s) const;
431#endif
432 bool startsWith(const OdChar * s) const;
433 bool startsWith(const char *s) const;
434#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
435 bool startsWith(const __wchar_t &c) const;
436#endif
437 bool startsWith(const OdChar &c) const;
438 bool startsWith(const char &c) const;
439
443#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
444 bool startsWithNoCase(const __wchar_t * s) const;
445#endif
446 bool startsWithNoCase(const OdChar * s) const;
447 bool startsWithNoCase(const char *s) const;
448#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
449 bool startsWithNoCase(const __wchar_t &c) const;
450#endif
451 bool startsWithNoCase(const OdChar &c) const;
452 bool startsWithNoCase(const char &c) const;
453
457 CFxString mid( int nFirst, int nCount ) const;
458
462 CFxString mid( int nFirst ) const;
463
467 CFxString left( int nCount ) const;
468
472 CFxString right( int nCount ) const;
473
481 CFxString spanIncludingA(const char* lpszCharSet) const;
482
490#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
491 CFxString spanIncluding(const __wchar_t* lpszCharSet) const;
492#endif
493 CFxString spanIncluding(const OdChar* lpszCharSet) const;
494
502 CFxString spanExcludingA(const char* lpszCharSet) const;
503
511#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
512 CFxString spanExcluding(const __wchar_t* lpszCharSet) const;
513#endif
514 CFxString spanExcluding(const OdChar* lpszCharSet) const;
515
520
525
530
535
540
544 CFxString& trimRightA( char chTarget );
545
549#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
550 CFxString& trimRightW( __wchar_t chTarget );
551#endif
553
558 CFxString& trimRightA( const char* lpszTargets );
559
564#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
565 CFxString& trimRight( const __wchar_t* lpszTargets );
566#endif
567 CFxString& trimRight( const OdChar* lpszTargets );
568
572 CFxString& trimLeftA( char chTarget );
573
577#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
578 CFxString& trimLeftW( __wchar_t chTarget );
579#endif
581
586 CFxString& trimLeftA( const char* lpszTargets );
587
592#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
593 CFxString& trimLeft( const __wchar_t* lpszTargets );
594#endif
595 CFxString& trimLeft( const OdChar* lpszTargets );
596
602 CFxString& replaceA( char chOld, char chNew );
603
609#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
610 CFxString& replaceW( __wchar_t chOld, __wchar_t chNew );
611#endif
612 CFxString& replaceW( OdChar chOld, OdChar chNew );
613
621 CFxString& replaceA( const char* lpszOld, const char* lpszNew );
622
630#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
631 CFxString& replace( const __wchar_t* lpszOld, const __wchar_t* lpszNew );
632#endif
633 CFxString& replace( const OdChar* lpszOld, const OdChar* lpszNew );
634
640 int removeA( char chRemove );
641
647#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
648 int removeW( __wchar_t chRemove );
649#endif
650 int removeW( OdChar chRemove );
651
660 int insertA( int nIndex, char ch );
661
670#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
671 int insertW( int nIndex, __wchar_t ch );
672#endif
673 int insertW( int nIndex, OdChar ch );
674
683 int insertA( int nIndex, const char* pstr );
684
693#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
694 int insert( int nIndex, const __wchar_t* pstr );
695#endif
696 int insert( int nIndex, const OdChar* pstr );
697
703 int deleteChars( int nIndex, int nCount = 1 );
704
712 int findA( char ch ) const;
713
721#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
722 int findW( __wchar_t ch ) const;
723#endif
724 int findW( OdChar ch ) const;
725
733 int reverseFindA( char ch ) const;
734
742#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
743 int reverseFindW( __wchar_t ch ) const;
744#endif
745 int reverseFindW( OdChar ch ) const;
746
754 int findA( char ch, int nStart ) const;
755
763#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
764 int findW( __wchar_t ch, int nStart ) const;
765#endif
766 int findW( OdChar ch, int nStart ) const;
767
775 int findOneOfA( const char* lpszCharSet ) const;
776
784#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
785 int findOneOf( const __wchar_t* lpszCharSet ) const;
786#endif
787 int findOneOf( const OdChar* lpszCharSet ) const;
788
795 int find( const CFxString& ) const;
796
803 int findA( const char* lpszSub ) const;
804
811#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
812 int find( const __wchar_t* lpszSub ) const;
813#endif
814 int find( const OdChar* lpszSub ) const;
815
823 int findA( const char* lpszSub, int nStart ) const;
824
832#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
833 int find( const __wchar_t* lpszSub, int nStart ) const;
834#endif
835 int find( const OdChar* lpszSub, int nStart ) const;
836
841 CFxString& format( const OdChar* lpszFormat, ... );
842#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
843 CFxString& format( const __wchar_t* lpszFormat, ... );
844#endif
845 // the next version does not work. Causes problems with va_start
846 //CFxString& format( const CFxString & lpszFormat, ... );
847
852#if defined(_MSC_VER)
853 CFxString& formatA( LPCSTR lpszFormat, ... );
854#else
855 CFxString& formatA( const char * lpszFormat, ... );
856#endif
857
862 CFxString& format( const OdChar* lpszFormat, const OdString& str );
863#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
864 CFxString& format( const __wchar_t* lpszFormat, const OdString& str );
865#endif
870 CFxString& vformatA( const char* lpszFormat, va_list argList ); /* va_list is not portable. */
871
876#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
877 CFxString& vformat( const __wchar_t* lpszFormat, va_list argList ); /* va_list is not portable. */
878#endif
879 CFxString& vformat( const OdChar* lpszFormat, va_list argList ); /* va_list is not portable. */
880
884 unsigned int GetCodePage() const;
885
889 void SetCodePage( unsigned int codePage );
890
894 CFxStringArray SplitA(char separator) const;
895
899#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
900 CFxStringArray SplitW(__wchar_t separator) const;
901#endif
902 CFxStringArray SplitW(OdChar separator) const;
903
904 OdCodePageId GetCadCodePage( unsigned int codePage ) const;
905
908
909 CFxString arg(long long a, int fieldwidth = 0, int base=10, unsigned short fillChar = ' ') const;
910 CFxString arg(unsigned long long a, int fieldwidth = 0, int base=10, unsigned short fillChar = ' ') const;
911 CFxString arg(long a, int fieldwidth = 0, int base=10, unsigned short fillChar = ' ') const;
912 CFxString arg(unsigned long a, int fieldwidth = 0, int base=10, unsigned short fillChar = ' ') const;
913 CFxString arg(int a, int fieldWidth = 0, int base = 10, unsigned short fillChar = ' ') const;
914 CFxString arg(unsigned int a, int fieldWidth = 0, int base = 10, unsigned short fillChar = ' ') const;
915 CFxString arg(short a, int fieldWidth = 0, int base = 10, unsigned short fillChar = ' ') const;
916 CFxString arg(unsigned short a, int fieldWidth = 0, int base = 10, unsigned short fillChar = ' ') const;
917 CFxString arg(double a, int fieldWidth = 0, char fmt = 'g', int prec = -1, unsigned short fillChar = ' ') const;
918 CFxString arg(char a, int fieldWidth = 0, unsigned short fillChar = ' ') const;
919#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
920 CFxString arg(__wchar_t a, int fieldWidth = 0, unsigned short fillChar = ' ') const;
921#endif
922 CFxString arg(const CFxString &a, int fieldWidth = 0, unsigned short fillChar = ' ') const;
923 CFxString arg(const CFxString &a1, const CFxString &a2) const;
924 CFxString arg(const CFxString &a1, const CFxString &a2, const CFxString &a3) const;
925 CFxString arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
926 const CFxString &a4) const;
927 CFxString arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
928 const CFxString &a4, const CFxString &a5) const;
929 CFxString arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
930 const CFxString &a4, const CFxString &a5, const CFxString &a6) const;
931 CFxString arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
932 const CFxString &a4, const CFxString &a5, const CFxString &a6,
933 const CFxString &a7) const;
934 CFxString arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
935 const CFxString &a4, const CFxString &a5, const CFxString &a6,
936 const CFxString &a7, const CFxString &a8) const;
937 CFxString arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
938 const CFxString &a4, const CFxString &a5, const CFxString &a6,
939 const CFxString &a7, const CFxString &a8, const CFxString &a9) const;
940 CFxString multiArg(int numArgs, const CFxString **args) const;
941
942protected:
946 CFxString( const char* lpch, int nLength );
947 CFxString( const char* lpch, int nLength, unsigned int codePage );
948
952#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
953 CFxString( const __wchar_t* lpch, int nLength );
954 CFxString( const __wchar_t* lpch, int nLength, unsigned int codePage );
955#endif
956 CFxString( const OdChar* lpch, int nLength );
957 CFxString( const OdChar* lpch, int nLength, unsigned int codePage );
958
963};
964
965inline bool operator==( const CFxString& s1, const QString& s2 )
966{
967 return( s1.compare( s2 ) == 0 );
968}
969
970inline bool operator==( const CFxString& s1, const CFxString& s2 )
971{ return( s1.compare(s2) == 0 ); }
972
973inline bool operator==(const CFxString& s1, const char* s2)
974{ return s1.compareA(s2) == 0; }
975
976#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
977inline bool operator==(const CFxString& s1, const __wchar_t* s2)
978{ return s1.compare(s2) == 0; }
979#endif
980
981inline bool operator==(const CFxString& s1, const OdChar* s2)
982{ return s1.compare(s2) == 0; }
983
984/*
985inline bool operator==(const CFxString& s1, const QString& s2)
986{ return s1.compare((const OdChar*)(s2.utf16())) == 0; }
987*/
988inline bool operator==(const char* s1, const CFxString& s2)
989{ return s2.compareA(s1) == 0; }
990
991#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
992inline bool operator==(const __wchar_t* s1, const CFxString& s2)
993{ return s2.compare(s1) == 0; }
994#endif
995
996inline bool operator==(const OdChar* s1, const CFxString& s2)
997{ return s2.compare(s1) == 0; }
998
999inline bool operator!=( const CFxString& s1, const QString& s2 )
1000{
1001 return s1.compare( s2 ) != 0;
1002}
1003
1004inline bool operator!=(const CFxString& s1, const CFxString& s2)
1005{ return s1.compare(s2) != 0; }
1006
1007inline bool operator!=(const CFxString& s1, const char* s2)
1008{ return s1.compareA(s2) != 0; }
1009
1010#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
1011inline bool operator!=(const CFxString& s1, const __wchar_t* s2)
1012{ return s1.compare(s2) != 0; }
1013#endif
1014
1015inline bool operator!=(const CFxString& s1, const OdChar* s2)
1016{ return s1.compare(s2) != 0; }
1017
1018inline bool operator!=(const char* s1, const CFxString& s2)
1019{ return s2.compareA(s1) != 0; }
1020
1021#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
1022inline bool operator!=(const __wchar_t* s1, const CFxString& s2)
1023{ return s2.compare(s1) != 0; }
1024#endif
1025
1026inline bool operator!=(const OdChar* s1, const CFxString& s2)
1027{ return s2.compare(s1) != 0; }
1028
1029inline bool operator<(const CFxString& s1, const CFxString& s2)
1030{ return s1.compare(s2) < 0; }
1031
1032inline bool operator<(const CFxString& s1, const char* s2)
1033{ return s1.compareA(s2) < 0; }
1034
1035#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
1036inline bool operator<(const CFxString& s1, const __wchar_t* s2)
1037{ return s1.compare(s2) < 0; }
1038#endif
1039
1040inline bool operator<(const CFxString& s1, const OdChar* s2)
1041{ return s1.compare(s2) < 0; }
1042
1043inline bool operator<(const char* s1, const CFxString& s2)
1044{ return s2.compareA(s1) > 0; }
1045
1046#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
1047inline bool operator<(const __wchar_t* s1, const CFxString& s2)
1048{ return s2.compare(s1) > 0; }
1049#endif
1050
1051inline bool operator<(const OdChar* s1, const CFxString& s2)
1052{ return s2.compare(s1) > 0; }
1053
1054inline bool operator>(const CFxString& s1, const CFxString& s2)
1055{ return s1.compare(s2) > 0; }
1056
1057inline bool operator>(const CFxString& s1, const char* s2)
1058{ return s1.compareA(s2) > 0; }
1059
1060#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
1061inline bool operator>(const CFxString& s1, const __wchar_t* s2)
1062{ return s1.compare(s2) > 0; }
1063#endif
1064
1065inline bool operator>(const CFxString& s1, const OdChar* s2)
1066{ return s1.compare(s2) > 0; }
1067
1068inline bool operator>(const char* s1, const CFxString& s2)
1069{ return s2.compareA(s1) < 0; }
1070
1071#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
1072inline bool operator>(const __wchar_t* s1, const CFxString& s2)
1073{ return s2.compare(s1) < 0; }
1074#endif
1075
1076inline bool operator>(const OdChar* s1, const CFxString& s2)
1077{ return s2.compare(s1) < 0; }
1078
1079inline bool operator<=(const CFxString& s1, const CFxString& s2)
1080{ return s1.compare(s2) <= 0; }
1081
1082inline bool operator<=(const CFxString& s1, const char* s2)
1083{ return s1.compareA(s2) <= 0; }
1084
1085#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
1086inline bool operator<=(const CFxString& s1, const __wchar_t* s2)
1087{ return s1.compare(s2) <= 0; }
1088#endif
1089
1090inline bool operator<=(const CFxString& s1, const OdChar* s2)
1091{ return s1.compare(s2) <= 0; }
1092
1093inline bool operator<=(const char* s1, const CFxString& s2)
1094{ return s2.compareA(s1) >= 0; }
1095
1096#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
1097inline bool operator<=(const __wchar_t* s1, const CFxString& s2)
1098{ return s2.compare(s1) >= 0; }
1099#endif
1100
1101inline bool operator<=(const OdChar* s1, const CFxString& s2)
1102{ return s2.compare(s1) >= 0; }
1103
1104inline bool operator>=(const CFxString& s1, const CFxString& s2)
1105{ return s1.compare(s2) >= 0; }
1106
1107inline bool operator>=(const CFxString& s1, const char* s2)
1108{ return s1.compareA(s2) >= 0; }
1109
1110#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
1111inline bool operator>=(const CFxString& s1, const __wchar_t* s2)
1112{ return s1.compare(s2) >= 0; }
1113#endif
1114
1115inline bool operator>=(const CFxString& s1, const OdChar* s2)
1116{ return s1.compare(s2) >= 0; }
1117
1118inline bool operator>=(const char* s1, const CFxString& s2)
1119{ return s2.compareA(s1) <= 0; }
1120
1121#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
1122inline bool operator>=(const __wchar_t* s1, const CFxString& s2)
1123{ return s2.compare(s1) <= 0; }
1124#endif
1125
1126inline bool operator>=(const OdChar* s1, const CFxString& s2)
1127{ return s2.compare(s1) <= 0; }
1128
1129inline CFxString CFxString::arg(int a, int fieldWidth, int base, unsigned short fillChar) const
1130{ return arg((long long)(a), fieldWidth, base, fillChar); }
1131inline CFxString CFxString::arg(unsigned int a, int fieldWidth, int base, unsigned short fillChar ) const
1132{ return arg((unsigned long long)(a), fieldWidth, base, fillChar); }
1133inline CFxString CFxString::arg(long a, int fieldWidth, int base, unsigned short fillChar ) const
1134{ return arg((long long)(a), fieldWidth, base, fillChar); }
1135inline CFxString CFxString::arg(unsigned long a, int fieldWidth, int base, unsigned short fillChar ) const
1136{ return arg((unsigned long long)(a), fieldWidth, base, fillChar); }
1137inline CFxString CFxString::arg(short a, int fieldWidth, int base, unsigned short fillChar ) const
1138{ return arg((long long)(a), fieldWidth, base, fillChar); }
1139inline CFxString CFxString::arg(unsigned short a, int fieldWidth, int base, unsigned short fillChar ) const
1140{ return arg((unsigned long long)(a), fieldWidth, base, fillChar); }
1141inline CFxString CFxString::arg(const CFxString &a1, const CFxString &a2) const
1142{ const CFxString *args[2] = { &a1, &a2 }; return multiArg(2, args); }
1143inline CFxString CFxString::arg(const CFxString &a1, const CFxString &a2, const CFxString &a3) const
1144{ const CFxString *args[3] = { &a1, &a2, &a3 }; return multiArg(3, args); }
1145inline CFxString CFxString::arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
1146 const CFxString &a4) const
1147{ const CFxString *args[4] = { &a1, &a2, &a3, &a4 }; return multiArg(4, args); }
1148inline CFxString CFxString::arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
1149 const CFxString &a4, const CFxString &a5) const
1150{ const CFxString *args[5] = { &a1, &a2, &a3, &a4, &a5 }; return multiArg(5, args); }
1151inline CFxString CFxString::arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
1152 const CFxString &a4, const CFxString &a5, const CFxString &a6) const
1153{ const CFxString *args[6] = { &a1, &a2, &a3, &a4, &a5, &a6 }; return multiArg(6, args); }
1154inline CFxString CFxString::arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
1155 const CFxString &a4, const CFxString &a5, const CFxString &a6,
1156 const CFxString &a7) const
1157{ const CFxString *args[7] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7 }; return multiArg(7, args); }
1158inline CFxString CFxString::arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
1159 const CFxString &a4, const CFxString &a5, const CFxString &a6,
1160 const CFxString &a7, const CFxString &a8) const
1161{ const CFxString *args[8] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8 }; return multiArg(8, args); }
1162inline CFxString CFxString::arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
1163 const CFxString &a4, const CFxString &a5, const CFxString &a6,
1164 const CFxString &a7, const CFxString &a8, const CFxString &a9) const
1165{ const CFxString *args[9] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8, &a9 }; return multiArg(9, args); }
1166//
1167
1168
1169#include "FxPragmaPop.h"
#define DDKERNEL_API
Definition DDKERNEL.h:32
bool operator!=(const CFxString &s1, const QString &s2)
Definition FxString.h:999
std::string CFxAnsiStringClass
Definition FxString.h:38
bool operator<=(const CFxString &s1, const CFxString &s2)
Definition FxString.h:1079
bool operator<(const CFxString &s1, const CFxString &s2)
Definition FxString.h:1029
#define getAtWW
Definition FxString.h:173
std::vector< CFxString > CFxStringArray
Definition FxString.h:37
bool operator>=(const CFxString &s1, const CFxString &s2)
Definition FxString.h:1104
#define wide_strW
Definition FxString.h:217
bool operator>(const CFxString &s1, const CFxString &s2)
Definition FxString.h:1054
bool operator==(const CFxString &s1, const QString &s2)
Definition FxString.h:965
OdCodePageId
Definition OdCodePage.h:31
wchar_t OdChar
OdString OdString
Definition OdString.h:1258
OdTrVisMiniVec4d< DataType > operator+(const OdTrVisMiniVec4d< DataType > &v1, const OdTrVisMiniVec4d< DataType > &v2)
CFxString spanExcluding(const OdChar *lpszCharSet) const
CFxStringPrivate * m_private
Definition FxString.h:962
bool startsWith(const OdChar &c) const
friend DDKERNEL_API CFxString operator+(const CFxString &stringSrc, OdChar ch)
CFxString left(int nCount) const
CFxString & trimRightW(OdChar chTarget)
CFxString & vformat(const OdChar *lpszFormat, va_list argList)
CFxString & trimRightA(const char *lpszTargets)
int find(const OdChar *lpszSub) const
int findW(OdChar ch) const
int reverseFindW(OdChar ch) const
friend DDKERNEL_API CFxString operator+(const CFxString &string1, const CFxString &string2)
friend DDKERNEL_API CFxString operator+(const CFxString &stringSrc, const OdChar *lpsz)
bool startsWithNoCase(const char *s) const
CFxString spanIncludingA(const char *lpszCharSet) const
bool startsWith(const char &c) const
const CFxString & operator=(const OdString &stringSrc)
CFxString(const OdAnsiString &stringSrc)
CFxString & trimLeftA(const char *lpszTargets)
CFxString(const OdChar *lpch, int nLength, unsigned int codePage)
bool EncodeHTML()
const CFxString & operator+=(const CFxString &stringSrc)
const CFxString & operator=(const char *lpsz)
CFxString arg(const CFxString &a, int fieldWidth=0, unsigned short fillChar=' ') const
CFxString(const char *lpch, int nLength, unsigned int codePage)
CFxString spanIncluding(const OdChar *lpszCharSet) const
const CFxString & operator=(const CFxString &stringSrc)
CFxString & replaceA(const char *lpszOld, const char *lpszNew)
int compareA(const char *lpsz) const
unsigned int GetCodePage() const
CFxString arg(char a, int fieldWidth=0, unsigned short fillChar=' ') const
const CFxString & operator=(char ch)
int findA(const char *lpszSub, int nStart) const
int removeW(OdChar chRemove)
CFxString spanExcludingA(const char *lpszCharSet) const
int insertA(int nIndex, char ch)
CFxString arg(long long a, int fieldwidth=0, int base=10, unsigned short fillChar=' ') const
static CFxString from_ansi_str(const CFxAnsiStringClass &data)
bool isNull() const
const CFxString & operator+=(char ch)
friend DDKERNEL_API CFxString operator+(OdChar ch, const CFxString &stringSrc)
int deleteChars(int nIndex, int nCount=1)
OdCodePageId GetCadCodePage(unsigned int codePage) const
int reverseFindA(char ch) const
CFxString(const OdChar *lpch, int nLength)
CFxString(const char *lpch, int nLength)
CFxString right(int nCount) const
CFxString(const OdAnsiString &stringSrc, unsigned int codePage)
int compareNoCase(const CFxString &stringSrc) const
int find(const OdChar *lpszSub, int nStart) const
int compareNoCaseA(const char *lpsz) const
CFxString(const QString &stringSrc)
int findA(char ch, int nStart) const
CFxString(const QString &stringSrc, unsigned int codePage)
const CFxString & operator+=(OdChar ch)
CFxString & replaceA(char chOld, char chNew)
CFxString arg(double a, int fieldWidth=0, char fmt='g', int prec=-1, unsigned short fillChar=' ') const
CFxString & trimLeftW(OdChar chTarget)
void SetCodePage(unsigned int codePage)
CFxString(OdChar ch, int nRepeat)
CFxString & makeReverse()
CFxString & makeUpper()
CFxString & formatA(const char *lpszFormat,...)
const CFxString & operator+=(const char *lpsz)
const CFxString & operator=(const OdChar *lpsz)
CFxString & makeLower()
int insertW(int nIndex, OdChar ch)
int compare(const CFxString &lpsz) const
CFxString(const Wt::WString &stringSrc, unsigned int codePage)
friend class CFxStringPrivate
Definition FxString.h:53
bool isEmpty() const
CFxString & trimLeftA(char chTarget)
CFxString(const CFxString &stringSrc)
CFxString(OdChar ch, int nRepeat, unsigned int codePage)
void clear()
bool equalNoCase(const OdChar *lpsz) const
static CFxString from_utf8_str(const CFxAnsiStringClass &data)
int getLength() const
int findOneOf(const OdChar *lpszCharSet) const
CFxString(const Wt::WString &stringSrc)
int findA(char ch) const
CFxString mid(int nFirst, int nCount) const
static CFxString from_utf8_str(const char *data)
int compareNoCase(const OdChar *lpsz) const
bool equalNoCase(const CFxString &stringSrc) const
CFxString & trimRightA(char chTarget)
CFxString(CFxString &&stringSrc)
const OdChar * wide_strU() const
friend DDKERNEL_API CFxString operator+(const CFxString &stringSrc, char ch)
CFxString & replaceW(OdChar chOld, OdChar chNew)
OdChar getAtWU(int nIndex) const
CFxAnsiStringClass utf8_str() const
bool startsWith(const char *s) const
CFxString multiArg(int numArgs, const CFxString **args) const
void setAtW(int nIndex, OdChar ch)
int insert(int nIndex, const OdChar *pstr)
CFxString & trimLeft()
const char * ansi_str() const
int findOneOfA(const char *lpszCharSet) const
int insertA(int nIndex, const char *pstr)
CFxString arg(unsigned long long a, int fieldwidth=0, int base=10, unsigned short fillChar=' ') const
CFxString(const OdChar *lpsz, unsigned int codePage)
bool startsWithNoCase(const OdChar *s) const
CFxString & vformatA(const char *lpszFormat, va_list argList)
friend DDKERNEL_API CFxString operator+(const CFxString &stringSrc, const char *lpsz)
CFxString & trimRight(const OdChar *lpszTargets)
CFxString(const OdString &stringSrc)
CFxString(char ch, int nRepeat, unsigned int codePage)
int removeA(char chRemove)
CFxString & operator=(CFxString &&stringSrc)
CFxStringArray SplitW(OdChar separator) const
int compare(const OdChar *lpsz) const
int find(const CFxString &) const
bool startsWithNoCase(const OdChar &c) const
const CFxString & operator+=(const OdChar *lpsz)
CFxString(char ch, int nRepeat)
bool DecodeHTML()
const CFxString & operator=(const OdAnsiString &stringSrc)
int findW(OdChar ch, int nStart) const
CFxString & trimRight()
CFxString(const OdString &stringSrc, unsigned int codePage)
int findA(const char *lpszSub) const
static CFxString from_ansi_str(const char *data)
CFxString & format(const OdChar *lpszFormat, const OdString &str)
bool startsWith(const OdChar *s) const
friend DDKERNEL_API CFxString operator+(const OdChar *lpsz, const CFxString &stringSrc)
CFxString mid(int nFirst) const
const CFxString & operator+=(const OdString &str)
CFxStringArray SplitA(char separator) const
void setAtA(int nIndex, char ch)
char getAtA(int nIndex) const
CFxString(const OdChar *lpsz)
const CFxString & operator=(OdChar ch)
bool startsWithNoCase(const char &c) const
CFxString & replace(const OdChar *lpszOld, const OdChar *lpszNew)
int getAllocLength() const
CFxString & trimLeft(const OdChar *lpszTargets)
CFxString & format(const OdChar *lpszFormat,...)
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
Definition gles2_ext.h:110
GLint GLint GLint GLsizei GLsizei GLenum format
Definition gles2_ext.h:111
Definition FxString.h:30