CFx SDK Documentation  2022 SP0
FxString.h
Go to the documentation of this file.
1 //
2 // (C) Copyright 2005-2021 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 "FxPragmaPush.h"
20 
21 #include "DDKERNEL.h"
22 
23 #include <OdString.h>
24 
25 #include <vector>
26 
27 namespace Wt
28 {
29  class WString;
30 }
31 
32 class QString;
33 
34 class CFxString;
35 typedef std::vector<CFxString> CFxStringArray;
37 
38 class CFxStringPrivate;
39 
48  {
49 public:
50 
51  friend class CFxStringPrivate;
52 
56 
59  CFxString( const CFxString& stringSrc );
60 
63  CFxString( const OdString& stringSrc );
64  CFxString( const OdString& stringSrc, unsigned int codePage );
65 
68  CFxString( const QString& stringSrc );
69  CFxString( const QString& stringSrc, unsigned int codePage );
70 
73  CFxString( const Wt::WString& stringSrc );
74  CFxString( const Wt::WString& stringSrc, unsigned int codePage );
75 
78  CFxString( const OdAnsiString& stringSrc );
79  CFxString( const OdAnsiString& stringSrc, unsigned int codePage );
80 
83  CFxString( char ch, int nRepeat );
84  CFxString( char ch, int nRepeat, unsigned int codePage );
85 
88  // no default conversion from ASCII string.
89  //CFxString( const char* lpsz, unsigned int codePage = CP_ACP );
90 
93  CFxString( OdChar ch, int nRepeat );
94  CFxString( OdChar ch, int nRepeat, unsigned int codePage );
95 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
96  CFxString( __wchar_t ch, int nRepeat );
97  CFxString( __wchar_t ch, int nRepeat, unsigned int codePage );
98 #endif
99 
102  CFxString( const OdChar* lpsz );
103  CFxString( const OdChar* lpsz, unsigned int codePage );
104 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
105  CFxString( const __wchar_t* lpsz);
106  CFxString( const __wchar_t* lpsz, unsigned int codePage );
107 #endif
110 
113  int getAllocLength() const;
114 
117  int getLength() const;
118 
125  bool isNull() const;
126 
129  bool isEmpty() const;
130 
133  void empty();
134 
137  char getAtA( int nIndex ) const;
138 
141 #if defined (_NATIVE_WCHAR_T_DEFINED)
142 #define getAtW getAtWW
143 #else
144 #define getAtW getAtWU
145 #endif
146 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
147  __wchar_t getAtWW( int nIndex ) const;
148 #else
149 #define getAtWW getAtWU
150 #endif
151  OdChar getAtWU( int nIndex ) const;
152 
155  void setAtA( int nIndex, char ch );
156 
159 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
160  void setAtW( int nIndex, __wchar_t ch );
161 #endif
162  void setAtW( int nIndex, OdChar ch );
163 
166  const char* ansi_str() const;
167  static CFxString from_ansi_str(const char* data);
169 
171  static CFxString from_utf8_str(const char* data);
173 
174 
177 #if defined (_NATIVE_WCHAR_T_DEFINED)
178 #define wide_str wide_strW
179 #else
180 #ifdef _MSC_VER
181 #define wide_str wide_strU
182 #else
183 #define wide_str wide_strW
184 #endif //_MSC_VER
185 #endif
186 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
187  const __wchar_t* wide_strW() const;
188 #else
189 #define wide_strW wide_strU
190 #endif
191  const OdChar* wide_strU() const;
192 
196 #if defined (_NATIVE_WCHAR_T_DEFINED)
197  inline operator LPCWSTR() const { return wide_strW();}
198 #else
199  #ifdef _MSC_VER
200  inline operator LPCWSTR() const { return wide_strU();}
201  #else
202  inline operator const wchar_t *() const { return wide_strW();}
203  #endif //_MSC_VER
204 #endif
205 
208 // operator const OdAnsiString&() const;
209 
212  operator OdString() const;
213 
216  operator const QString&() const;
217 
220  operator const Wt::WString&() const;
221 
224  const CFxString& operator=( const CFxString& stringSrc );
225 
228  const CFxString& operator=( const OdAnsiString& stringSrc );
229 
232  const CFxString& operator=( const OdString& stringSrc );
233 
236  const CFxString& operator=( char ch );
237 
240 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
241  const CFxString& operator=( __wchar_t ch );
242 #endif
243  const CFxString& operator=( OdChar ch );
244 
247  const CFxString& operator=( const char* lpsz );
248 
251 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
252  const CFxString& operator=( const __wchar_t* lpsz );
253 #endif
254  const CFxString& operator=( const OdChar* lpsz );
255 
265  const CFxString& operator+=( const CFxString& stringSrc );
266 
276  const CFxString& operator+=( char ch );
277 
287 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
288  const CFxString& operator+=( __wchar_t ch );
289 #endif
291 
301  const CFxString& operator+=( const char* lpsz );
302 
312 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
313  const CFxString& operator+=( const __wchar_t* lpsz );
314 #endif
315  const CFxString& operator+=( const OdChar* lpsz );
316  const CFxString& operator+=( const OdString& str );
317 
318  friend DDKERNEL_API CFxString operator+( const CFxString& string1, const CFxString& string2 );
319  friend DDKERNEL_API CFxString operator+( const CFxString& stringSrc, char ch );
320 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
321  friend DDKERNEL_API CFxString operator+( const CFxString& stringSrc, __wchar_t ch );
322 #endif
323  friend DDKERNEL_API CFxString operator+( const CFxString& stringSrc, OdChar ch );
324 
325  // no automatic conversion from ASCII
326  //friend DDKERNEL_API CFxString operator+( char ch, const CFxString& stringSrc );
327 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
328  friend DDKERNEL_API CFxString operator+( __wchar_t ch, const CFxString& stringSrc );
329 #endif
330  friend DDKERNEL_API CFxString operator+( OdChar ch, const CFxString& stringSrc );
331  friend DDKERNEL_API CFxString operator+( const CFxString& stringSrc, const char* lpsz );
332 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
333  friend DDKERNEL_API CFxString operator+( const CFxString& stringSrc, const __wchar_t* lpsz );
334 #endif
335  friend DDKERNEL_API CFxString operator+( const CFxString& stringSrc, const OdChar* lpsz );
336 
337  // no automatic conversion from ASCII
338  //friend DDKERNEL_API CFxString operator+( const char* lpsz, const CFxString& stringSrc );
339 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
340  friend DDKERNEL_API CFxString operator+( const __wchar_t* lpsz, const CFxString& stringSrc );
341 #endif
342  friend DDKERNEL_API CFxString operator+( const OdChar* lpsz, const CFxString& stringSrc );
343 
348  int compareA( const char* lpsz ) const;
349 
354 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
355  int compare( const __wchar_t* lpsz ) const;
356 #endif
357  int compare( const OdChar* lpsz ) const;
358  int compare( const CFxString & lpsz ) const;
359 
362  int compareNoCaseA( const char *lpsz ) const;
363 
366 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
367  int compareNoCase( const __wchar_t *lpsz ) const;
368 #endif
369  int compareNoCase( const OdChar *lpsz ) const;
370 
373  int compareNoCase(const CFxString & stringSrc) const;
374 
377  bool equalNoCase( const OdChar* lpsz ) const;
378 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
379  bool equalNoCase( const __wchar_t* lpsz ) const;
380 #endif
381 
384  bool equalNoCase(const CFxString & stringSrc) const;
385 
386 
389 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
390  bool startsWith(const __wchar_t * s) const;
391 #endif
392  bool startsWith(const OdChar * s) const;
393  bool startsWith(const char *s) const;
394 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
395  bool startsWith(const __wchar_t &c) const;
396 #endif
397  bool startsWith(const OdChar &c) const;
398  bool startsWith(const char &c) const;
399 
402 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
403  bool startsWithNoCase(const __wchar_t * s) const;
404 #endif
405  bool startsWithNoCase(const OdChar * s) const;
406  bool startsWithNoCase(const char *s) const;
407 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
408  bool startsWithNoCase(const __wchar_t &c) const;
409 #endif
410  bool startsWithNoCase(const OdChar &c) const;
411  bool startsWithNoCase(const char &c) const;
412 
415  CFxString mid( int nFirst, int nCount ) const;
416 
419  CFxString mid( int nFirst ) const;
420 
423  CFxString left( int nCount ) const;
424 
427  CFxString right( int nCount ) const;
428 
435  CFxString spanIncludingA(const char* lpszCharSet) const;
436 
443 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
444  CFxString spanIncluding(const __wchar_t* lpszCharSet) const;
445 #endif
446  CFxString spanIncluding(const OdChar* lpszCharSet) const;
447 
454  CFxString spanExcludingA(const char* lpszCharSet) const;
455 
462 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
463  CFxString spanExcluding(const __wchar_t* lpszCharSet) const;
464 #endif
465  CFxString spanExcluding(const OdChar* lpszCharSet) const;
466 
470 
474 
478 
482 
486 
489  CFxString& trimRightA( char chTarget );
490 
493 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
494  CFxString& trimRightW( __wchar_t chTarget );
495 #endif
497 
501  CFxString& trimRightA( const char* lpszTargets );
502 
506 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
507  CFxString& trimRight( const __wchar_t* lpszTargets );
508 #endif
509  CFxString& trimRight( const OdChar* lpszTargets );
510 
513  CFxString& trimLeftA( char chTarget );
514 
517 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
518  CFxString& trimLeftW( __wchar_t chTarget );
519 #endif
520  CFxString& trimLeftW( OdChar chTarget );
521 
525  CFxString& trimLeftA( const char* lpszTargets );
526 
530 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
531  CFxString& trimLeft( const __wchar_t* lpszTargets );
532 #endif
533  CFxString& trimLeft( const OdChar* lpszTargets );
534 
541  CFxString& replaceA( char chOld, char chNew );
542 
549 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
550  CFxString& replaceW( __wchar_t chOld, __wchar_t chNew );
551 #endif
552  CFxString& replaceW( OdChar chOld, OdChar chNew );
553 
563  CFxString& replaceA( const char* lpszOld, const char* lpszNew );
564 
574 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
575  CFxString& replace( const __wchar_t* lpszOld, const __wchar_t* lpszNew );
576 #endif
577  CFxString& replace( const OdChar* lpszOld, const OdChar* lpszNew );
578 
585  int removeA( char chRemove );
586 
593 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
594  int removeW( __wchar_t chRemove );
595 #endif
596  int removeW( OdChar chRemove );
597 
608  int insertA( int nIndex, char ch );
609 
620 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
621  int insertW( int nIndex, __wchar_t ch );
622 #endif
623  int insertW( int nIndex, OdChar ch );
624 
635  int insertA( int nIndex, const char* pstr );
636 
647 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
648  int insert( int nIndex, const __wchar_t* pstr );
649 #endif
650  int insert( int nIndex, const OdChar* pstr );
651 
658  int deleteChars( int nIndex, int nCount = 1 );
659 
668  int findA( char ch ) const;
669 
678 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
679  int findW( __wchar_t ch ) const;
680 #endif
681  int findW( OdChar ch ) const;
682 
691  int reverseFindA( char ch ) const;
692 
701 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
702  int reverseFindW( __wchar_t ch ) const;
703 #endif
704  int reverseFindW( OdChar ch ) const;
705 
714  int findA( char ch, int nStart ) const;
715 
724 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
725  int findW( __wchar_t ch, int nStart ) const;
726 #endif
727  int findW( OdChar ch, int nStart ) const;
728 
737  int findOneOfA( const char* lpszCharSet ) const;
738 
747 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
748  int findOneOf( const __wchar_t* lpszCharSet ) const;
749 #endif
750  int findOneOf( const OdChar* lpszCharSet ) const;
751 
759  int find( const CFxString& ) const;
760 
768  int findA( const char* lpszSub ) const;
769 
777 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
778  int find( const __wchar_t* lpszSub ) const;
779 #endif
780  int find( const OdChar* lpszSub ) const;
781 
791  int findA( const char* lpszSub, int nStart ) const;
792 
802 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
803  int find( const __wchar_t* lpszSub, int nStart ) const;
804 #endif
805  int find( const OdChar* lpszSub, int nStart ) const;
806 
810  CFxString& format( const OdChar* lpszFormat, ... );
811 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
812  CFxString& format( const __wchar_t* lpszFormat, ... );
813 #endif
814  // the next version does not work. Causes problems with va_start
815  //CFxString& format( const CFxString & lpszFormat, ... );
816 
820 #if defined(_MSC_VER)
821  CFxString& formatA( LPCSTR lpszFormat, ... );
822 #else
823  CFxString& formatA( const char * lpszFormat, ... );
824 #endif
825 
829  CFxString& format( const OdChar* lpszFormat, const OdString& str );
830 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
831  CFxString& format( const __wchar_t* lpszFormat, const OdString& str );
832 #endif
836  CFxString& vformatA( const char* lpszFormat, va_list argList ); /* va_list is not portable. */
837 
841 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
842  CFxString& vformat( const __wchar_t* lpszFormat, va_list argList ); /* va_list is not portable. */
843 #endif
844  CFxString& vformat( const OdChar* lpszFormat, va_list argList ); /* va_list is not portable. */
845 
848  unsigned int GetCodePage() const;
849 
852  void SetCodePage( unsigned int codePage );
853 
856  CFxStringArray SplitA(char separator) const;
857 
860 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
861  CFxStringArray SplitW(__wchar_t separator) const;
862 #endif
863  CFxStringArray SplitW(OdChar separator) const;
864 
865  OdCodePageId GetCadCodePage( unsigned int codePage ) const;
866 
867  bool EncodeHTML();
868  bool DecodeHTML();
869 
870  CFxString arg(long long a, int fieldwidth = 0, int base=10, unsigned short fillChar = ' ') const;
871  CFxString arg(unsigned long long a, int fieldwidth = 0, int base=10, unsigned short fillChar = ' ') const;
872  CFxString arg(long a, int fieldwidth = 0, int base=10, unsigned short fillChar = ' ') const;
873  CFxString arg(unsigned long a, int fieldwidth = 0, int base=10, unsigned short fillChar = ' ') const;
874  CFxString arg(int a, int fieldWidth = 0, int base = 10, unsigned short fillChar = ' ') const;
875  CFxString arg(unsigned int a, int fieldWidth = 0, int base = 10, unsigned short fillChar = ' ') const;
876  CFxString arg(short a, int fieldWidth = 0, int base = 10, unsigned short fillChar = ' ') const;
877  CFxString arg(unsigned short a, int fieldWidth = 0, int base = 10, unsigned short fillChar = ' ') const;
878  CFxString arg(double a, int fieldWidth = 0, char fmt = 'g', int prec = -1, unsigned short fillChar = ' ') const;
879  CFxString arg(char a, int fieldWidth = 0, unsigned short fillChar = ' ') const;
880 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
881  CFxString arg(__wchar_t a, int fieldWidth = 0, unsigned short fillChar = ' ') const;
882 #endif
883  CFxString arg(const CFxString &a, int fieldWidth = 0, unsigned short fillChar = ' ') const;
884  CFxString arg(const CFxString &a1, const CFxString &a2) const;
885  CFxString arg(const CFxString &a1, const CFxString &a2, const CFxString &a3) const;
886  CFxString arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
887  const CFxString &a4) const;
888  CFxString arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
889  const CFxString &a4, const CFxString &a5) const;
890  CFxString arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
891  const CFxString &a4, const CFxString &a5, const CFxString &a6) const;
892  CFxString arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
893  const CFxString &a4, const CFxString &a5, const CFxString &a6,
894  const CFxString &a7) const;
895  CFxString arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
896  const CFxString &a4, const CFxString &a5, const CFxString &a6,
897  const CFxString &a7, const CFxString &a8) const;
898  CFxString arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
899  const CFxString &a4, const CFxString &a5, const CFxString &a6,
900  const CFxString &a7, const CFxString &a8, const CFxString &a9) const;
901  CFxString multiArg(int numArgs, const CFxString **args) const;
902 
903 protected:
906  CFxString( const char* lpch, int nLength );
907  CFxString( const char* lpch, int nLength, unsigned int codePage );
908 
911 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
912  CFxString( const __wchar_t* lpch, int nLength );
913  CFxString( const __wchar_t* lpch, int nLength, unsigned int codePage );
914 #endif
915  CFxString( const OdChar* lpch, int nLength );
916  CFxString( const OdChar* lpch, int nLength, unsigned int codePage );
917 
920  mutable CFxStringPrivate * m_private;
921 };
922 
923 inline bool operator==( const CFxString& s1, const QString& s2 )
924 {
925  return( s1.compare( s2 ) == 0 );
926 }
927 
928 inline bool operator==( const CFxString& s1, const CFxString& s2 )
929 { return( s1.compare(s2) == 0 ); }
930 
931 inline bool operator==(const CFxString& s1, const char* s2)
932 { return s1.compareA(s2) == 0; }
933 
934 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
935 inline bool operator==(const CFxString& s1, const __wchar_t* s2)
936 { return s1.compare(s2) == 0; }
937 #endif
938 
939 inline bool operator==(const CFxString& s1, const OdChar* s2)
940 { return s1.compare(s2) == 0; }
941 
942 /*
943 inline bool operator==(const CFxString& s1, const QString& s2)
944 { return s1.compare((const OdChar*)(s2.utf16())) == 0; }
945 */
946 inline bool operator==(const char* s1, const CFxString& s2)
947 { return s2.compareA(s1) == 0; }
948 
949 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
950 inline bool operator==(const __wchar_t* s1, const CFxString& s2)
951 { return s2.compare(s1) == 0; }
952 #endif
953 
954 inline bool operator==(const OdChar* s1, const CFxString& s2)
955 { return s2.compare(s1) == 0; }
956 
957 inline bool operator!=( const CFxString& s1, const QString& s2 )
958 {
959  return s1.compare( s2 ) != 0;
960 }
961 
962 inline bool operator!=(const CFxString& s1, const CFxString& s2)
963 { return s1.compare(s2) != 0; }
964 
965 inline bool operator!=(const CFxString& s1, const char* s2)
966 { return s1.compareA(s2) != 0; }
967 
968 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
969 inline bool operator!=(const CFxString& s1, const __wchar_t* s2)
970 { return s1.compare(s2) != 0; }
971 #endif
972 
973 inline bool operator!=(const CFxString& s1, const OdChar* s2)
974 { return s1.compare(s2) != 0; }
975 
976 inline bool operator!=(const char* s1, const CFxString& s2)
977 { return s2.compareA(s1) != 0; }
978 
979 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
980 inline bool operator!=(const __wchar_t* s1, const CFxString& s2)
981 { return s2.compare(s1) != 0; }
982 #endif
983 
984 inline bool operator!=(const OdChar* s1, const CFxString& s2)
985 { return s2.compare(s1) != 0; }
986 
987 inline bool operator<(const CFxString& s1, const CFxString& s2)
988 { return s1.compare(s2) < 0; }
989 
990 inline bool operator<(const CFxString& s1, const char* s2)
991 { return s1.compareA(s2) < 0; }
992 
993 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
994 inline bool operator<(const CFxString& s1, const __wchar_t* s2)
995 { return s1.compare(s2) < 0; }
996 #endif
997 
998 inline bool operator<(const CFxString& s1, const OdChar* s2)
999 { return s1.compare(s2) < 0; }
1000 
1001 inline bool operator<(const char* s1, const CFxString& s2)
1002 { return s2.compareA(s1) > 0; }
1003 
1004 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
1005 inline bool operator<(const __wchar_t* s1, const CFxString& s2)
1006 { return s2.compare(s1) > 0; }
1007 #endif
1008 
1009 inline bool operator<(const OdChar* s1, const CFxString& s2)
1010 { return s2.compare(s1) > 0; }
1011 
1012 inline bool operator>(const CFxString& s1, const CFxString& s2)
1013 { return s1.compare(s2) > 0; }
1014 
1015 inline bool operator>(const CFxString& s1, const char* s2)
1016 { return s1.compareA(s2) > 0; }
1017 
1018 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
1019 inline bool operator>(const CFxString& s1, const __wchar_t* s2)
1020 { return s1.compare(s2) > 0; }
1021 #endif
1022 
1023 inline bool operator>(const CFxString& s1, const OdChar* s2)
1024 { return s1.compare(s2) > 0; }
1025 
1026 inline bool operator>(const char* s1, const CFxString& s2)
1027 { return s2.compareA(s1) < 0; }
1028 
1029 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
1030 inline bool operator>(const __wchar_t* s1, const CFxString& s2)
1031 { return s2.compare(s1) < 0; }
1032 #endif
1033 
1034 inline bool operator>(const OdChar* s1, const CFxString& s2)
1035 { return s2.compare(s1) < 0; }
1036 
1037 inline bool operator<=(const CFxString& s1, const CFxString& s2)
1038 { return s1.compare(s2) <= 0; }
1039 
1040 inline bool operator<=(const CFxString& s1, const char* s2)
1041 { return s1.compareA(s2) <= 0; }
1042 
1043 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
1044 inline bool operator<=(const CFxString& s1, const __wchar_t* s2)
1045 { return s1.compare(s2) <= 0; }
1046 #endif
1047 
1048 inline bool operator<=(const CFxString& s1, const OdChar* s2)
1049 { return s1.compare(s2) <= 0; }
1050 
1051 inline bool operator<=(const char* s1, const CFxString& s2)
1052 { return s2.compareA(s1) >= 0; }
1053 
1054 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
1055 inline bool operator<=(const __wchar_t* s1, const CFxString& s2)
1056 { return s2.compare(s1) >= 0; }
1057 #endif
1058 
1059 inline bool operator<=(const OdChar* s1, const CFxString& s2)
1060 { return s2.compare(s1) >= 0; }
1061 
1062 inline bool operator>=(const CFxString& s1, const CFxString& s2)
1063 { return s1.compare(s2) >= 0; }
1064 
1065 inline bool operator>=(const CFxString& s1, const char* s2)
1066 { return s1.compareA(s2) >= 0; }
1067 
1068 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
1069 inline bool operator>=(const CFxString& s1, const __wchar_t* s2)
1070 { return s1.compare(s2) >= 0; }
1071 #endif
1072 
1073 inline bool operator>=(const CFxString& s1, const OdChar* s2)
1074 { return s1.compare(s2) >= 0; }
1075 
1076 inline bool operator>=(const char* s1, const CFxString& s2)
1077 { return s2.compareA(s1) <= 0; }
1078 
1079 #if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(_WIN32_WCE)
1080 inline bool operator>=(const __wchar_t* s1, const CFxString& s2)
1081 { return s2.compare(s1) <= 0; }
1082 #endif
1083 
1084 inline bool operator>=(const OdChar* s1, const CFxString& s2)
1085 { return s2.compare(s1) <= 0; }
1086 
1087 inline CFxString CFxString::arg(int a, int fieldWidth, int base, unsigned short fillChar) const
1088 { return arg((long long)(a), fieldWidth, base, fillChar); }
1089 inline CFxString CFxString::arg(unsigned int a, int fieldWidth, int base, unsigned short fillChar ) const
1090 { return arg((unsigned long long)(a), fieldWidth, base, fillChar); }
1091 inline CFxString CFxString::arg(long a, int fieldWidth, int base, unsigned short fillChar ) const
1092 { return arg((long long)(a), fieldWidth, base, fillChar); }
1093 inline CFxString CFxString::arg(unsigned long a, int fieldWidth, int base, unsigned short fillChar ) const
1094 { return arg((unsigned long long)(a), fieldWidth, base, fillChar); }
1095 inline CFxString CFxString::arg(short a, int fieldWidth, int base, unsigned short fillChar ) const
1096 { return arg((long long)(a), fieldWidth, base, fillChar); }
1097 inline CFxString CFxString::arg(unsigned short a, int fieldWidth, int base, unsigned short fillChar ) const
1098 { return arg((unsigned long long)(a), fieldWidth, base, fillChar); }
1099 inline CFxString CFxString::arg(const CFxString &a1, const CFxString &a2) const
1100 { const CFxString *args[2] = { &a1, &a2 }; return multiArg(2, args); }
1101 inline CFxString CFxString::arg(const CFxString &a1, const CFxString &a2, const CFxString &a3) const
1102 { const CFxString *args[3] = { &a1, &a2, &a3 }; return multiArg(3, args); }
1103 inline CFxString CFxString::arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
1104  const CFxString &a4) const
1105 { const CFxString *args[4] = { &a1, &a2, &a3, &a4 }; return multiArg(4, args); }
1106 inline CFxString CFxString::arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
1107  const CFxString &a4, const CFxString &a5) const
1108 { const CFxString *args[5] = { &a1, &a2, &a3, &a4, &a5 }; return multiArg(5, args); }
1109 inline CFxString CFxString::arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
1110  const CFxString &a4, const CFxString &a5, const CFxString &a6) const
1111 { const CFxString *args[6] = { &a1, &a2, &a3, &a4, &a5, &a6 }; return multiArg(6, args); }
1112 inline CFxString CFxString::arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
1113  const CFxString &a4, const CFxString &a5, const CFxString &a6,
1114  const CFxString &a7) const
1115 { const CFxString *args[7] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7 }; return multiArg(7, args); }
1116 inline CFxString CFxString::arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
1117  const CFxString &a4, const CFxString &a5, const CFxString &a6,
1118  const CFxString &a7, const CFxString &a8) const
1119 { const CFxString *args[8] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8 }; return multiArg(8, args); }
1120 inline CFxString CFxString::arg(const CFxString &a1, const CFxString &a2, const CFxString &a3,
1121  const CFxString &a4, const CFxString &a5, const CFxString &a6,
1122  const CFxString &a7, const CFxString &a8, const CFxString &a9) const
1123 { const CFxString *args[9] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8, &a9 }; return multiArg(9, args); }
1124 //
1125 
1126 
1127 #include "FxPragmaPop.h"
#define DDKERNEL_API
Definition: DDKERNEL.h:32
bool operator!=(const CFxString &s1, const QString &s2)
Definition: FxString.h:957
std::string CFxAnsiStringClass
Definition: FxString.h:36
bool operator<=(const CFxString &s1, const CFxString &s2)
Definition: FxString.h:1037
bool operator<(const CFxString &s1, const CFxString &s2)
Definition: FxString.h:987
#define getAtWW
Definition: FxString.h:149
std::vector< CFxString > CFxStringArray
Definition: FxString.h:34
bool operator>=(const CFxString &s1, const CFxString &s2)
Definition: FxString.h:1062
#define wide_strW
Definition: FxString.h:189
bool operator>(const CFxString &s1, const CFxString &s2)
Definition: FxString.h:1012
bool operator==(const CFxString &s1, const QString &s2)
Definition: FxString.h:923
OdCodePageId
Definition: OdCodePage.h:31
wchar_t OdChar
OdString OdString
Definition: OdString.h:1224
CFxString spanExcluding(const OdChar *lpszCharSet) const
const CFxString & operator=(OdChar ch)
CFxStringPrivate * m_private
Definition: FxString.h:920
CFxString & vformatA(const char *lpszFormat, va_list argList)
bool startsWith(const OdChar &c) const
CFxString & makeReverse()
friend DDKERNEL_API CFxString operator+(const CFxString &stringSrc, OdChar ch)
CFxString left(int nCount) const
CFxString & trimRight(const OdChar *lpszTargets)
const OdChar * wide_strU() const
int find(const OdChar *lpszSub) const
int findW(OdChar ch) const
int reverseFindW(OdChar ch) const
CFxString & formatA(const char *lpszFormat,...)
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
CFxString(const OdAnsiString &stringSrc)
CFxString(const OdChar *lpch, int nLength, unsigned int codePage)
bool EncodeHTML()
const CFxString & operator=(const CFxString &stringSrc)
const CFxString & operator=(const OdChar *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
CFxString & replaceA(char chOld, char chNew)
CFxString & trimLeftA(const char *lpszTargets)
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
const char * ansi_str() const
const CFxString & operator+=(const char *lpsz)
static CFxString from_ansi_str(const CFxAnsiStringClass &data)
bool isNull() const
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 & format(const OdChar *lpszFormat, const OdString &str)
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 & trimLeft()
CFxString(const QString &stringSrc)
int findA(char ch, int nStart) const
CFxString(const QString &stringSrc, unsigned int codePage)
CFxString & vformat(const OdChar *lpszFormat, va_list argList)
CFxString arg(double a, int fieldWidth=0, char fmt='g', int prec=-1, unsigned short fillChar=' ') const
CFxString & replaceW(OdChar chOld, OdChar chNew)
void SetCodePage(unsigned int codePage)
CFxString(OdChar ch, int nRepeat)
CFxString & makeLower()
const CFxString & operator=(char ch)
const CFxString & operator=(const char *lpsz)
int insertW(int nIndex, OdChar ch)
CFxString & trimRightA(char chTarget)
int compare(const CFxString &lpsz) const
CFxString(const Wt::WString &stringSrc, unsigned int codePage)
bool isEmpty() const
CFxString(const CFxString &stringSrc)
void empty()
CFxString & trimRightW(OdChar chTarget)
CFxString & makeUpper()
CFxString(OdChar ch, int nRepeat, unsigned int codePage)
CFxString & trimRightA(const char *lpszTargets)
CFxString & trimRight()
bool equalNoCase(const OdChar *lpsz) const
const CFxString & operator=(const OdAnsiString &stringSrc)
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
const CFxString & operator+=(const OdString &str)
bool equalNoCase(const CFxString &stringSrc) const
friend DDKERNEL_API CFxString operator+(const CFxString &stringSrc, char ch)
CFxString & trimLeftW(OdChar chTarget)
OdChar getAtWU(int nIndex) const
CFxAnsiStringClass utf8_str() const
bool startsWith(const char *s) const
CFxString multiArg(int numArgs, const CFxString **args) const
CFxString & replace(const OdChar *lpszOld, const OdChar *lpszNew)
void setAtW(int nIndex, OdChar ch)
int insert(int nIndex, const OdChar *pstr)
int findOneOfA(const char *lpszCharSet) const
CFxString & replaceA(const char *lpszOld, const char *lpszNew)
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
friend DDKERNEL_API CFxString operator+(const CFxString &stringSrc, const char *lpsz)
const CFxString & operator=(const OdString &stringSrc)
CFxString(const OdString &stringSrc)
CFxString(char ch, int nRepeat, unsigned int codePage)
const CFxString & operator+=(const OdChar *lpsz)
int removeA(char chRemove)
CFxStringArray SplitW(OdChar separator) const
int compare(const OdChar *lpsz) const
int find(const CFxString &) const
CFxString & format(const OdChar *lpszFormat,...)
CFxString & trimLeft(const OdChar *lpszTargets)
bool startsWithNoCase(const OdChar &c) const
CFxString(char ch, int nRepeat)
const CFxString & operator+=(const CFxString &stringSrc)
bool DecodeHTML()
int findW(OdChar ch, int nStart) const
CFxString(const OdString &stringSrc, unsigned int codePage)
int findA(const char *lpszSub) const
static CFxString from_ansi_str(const char *data)
bool startsWith(const OdChar *s) const
friend DDKERNEL_API CFxString operator+(const OdChar *lpsz, const CFxString &stringSrc)
CFxString mid(int nFirst) const
CFxStringArray SplitA(char separator) const
CFxString & trimLeftA(char chTarget)
void setAtA(int nIndex, char ch)
char getAtA(int nIndex) const
CFxString(const OdChar *lpsz)
bool startsWithNoCase(const char &c) const
const CFxString & operator+=(OdChar ch)
int getAllocLength() const
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
GLsizei const GLchar *const * string
Definition: gles2_ext.h:292
Definition: FxString.h:28