1 // Created on: 1993-02-22
2 // Created by: Mireille MERCIEN
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _TCollection_AsciiString_HeaderFile
18 #define _TCollection_AsciiString_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_PCharacter.hxx>
25 #include <Standard_Integer.hxx>
26 #include <Standard_CString.hxx>
27 #include <Standard_Character.hxx>
28 #include <Standard_Real.hxx>
29 #include <Standard_Boolean.hxx>
30 #include <Standard_OStream.hxx>
31 #include <Standard_IStream.hxx>
32 class Standard_NullObject;
33 class Standard_OutOfRange;
34 class Standard_NumericError;
35 class Standard_NegativeValue;
36 class TCollection_HAsciiString;
37 class TCollection_ExtendedString;
40 //! A variable-length sequence of ASCII characters
41 //! (normal 8-bit character type). It provides editing
42 //! operations with built-in memory management to
43 //! make AsciiString objects easier to use than
44 //! ordinary character arrays.
45 //! AsciiString objects follow value semantics; in
46 //! other words, they are the actual strings, not
47 //! handles to strings, and are copied through
48 //! assignment. You may use HAsciiString objects
49 //! to get handles to strings.
50 class TCollection_AsciiString
57 //! Initializes a AsciiString to an empty AsciiString.
58 Standard_EXPORT TCollection_AsciiString();
60 //! Initializes a AsciiString with a CString.
61 Standard_EXPORT TCollection_AsciiString(const Standard_CString message);
63 //! Initializes a AsciiString with a CString.
64 Standard_EXPORT TCollection_AsciiString(const Standard_CString message, const Standard_Integer aLen);
66 //! Initializes a AsciiString with a single character.
67 Standard_EXPORT TCollection_AsciiString(const Standard_Character aChar);
69 //! Initializes an AsciiString with <length> space allocated.
70 //! and filled with <filler>. This is usefull for buffers.
71 Standard_EXPORT TCollection_AsciiString(const Standard_Integer length, const Standard_Character filler);
73 //! Initializes an AsciiString with an integer value
74 Standard_EXPORT TCollection_AsciiString(const Standard_Integer value);
76 //! Initializes an AsciiString with a real value
77 Standard_EXPORT TCollection_AsciiString(const Standard_Real value);
79 //! Initializes a AsciiString with another AsciiString.
80 Standard_EXPORT TCollection_AsciiString(const TCollection_AsciiString& astring);
82 //! Initializes a AsciiString with copy of another AsciiString
83 //! concatenated with the message character.
84 Standard_EXPORT TCollection_AsciiString(const TCollection_AsciiString& astring, const Standard_Character message);
86 //! Initializes a AsciiString with copy of another AsciiString
87 //! concatenated with the message string.
88 Standard_EXPORT TCollection_AsciiString(const TCollection_AsciiString& astring, const Standard_CString message);
90 //! Initializes a AsciiString with copy of another AsciiString
91 //! concatenated with the message string.
92 Standard_EXPORT TCollection_AsciiString(const TCollection_AsciiString& astring, const TCollection_AsciiString& message);
94 //! Creation by converting an extended string to an ascii string.
95 //! If replaceNonAscii is non-null charecter, it will be used
96 //! in place of any non-ascii character found in the source string.
97 //! Otherwise, creates UTF-8 unicode string.
98 Standard_EXPORT TCollection_AsciiString(const TCollection_ExtendedString& astring, const Standard_Character replaceNonAscii = 0);
100 //! Appends <other> to me. This is an unary operator.
101 Standard_EXPORT void AssignCat (const Standard_Character other);
102 void operator += (const Standard_Character other)
107 //! Appends <other> to me. This is an unary operator.
108 Standard_EXPORT void AssignCat (const Standard_Integer other);
109 void operator += (const Standard_Integer other)
114 //! Appends <other> to me. This is an unary operator.
115 Standard_EXPORT void AssignCat (const Standard_Real other);
116 void operator += (const Standard_Real other)
121 //! Appends <other> to me. This is an unary operator.
122 //! ex: aString += "Dummy"
123 //! To catenate more than one CString, you must put a
124 //! AsciiString before.
125 //! Example: aString += "Hello " + "Dolly" IS NOT VALID !
126 //! But astring += anotherString + "Hello " + "Dolly" is valid.
127 Standard_EXPORT void AssignCat (const Standard_CString other);
128 void operator += (const Standard_CString other)
133 //! Appends <other> to me. This is an unary operator.
134 //! Example: aString += anotherString
135 Standard_EXPORT void AssignCat (const TCollection_AsciiString& other);
136 void operator += (const TCollection_AsciiString& other)
141 //! Converts the first character into its corresponding
142 //! upper-case character and the other characters into lowercase
147 Standard_EXPORT void Capitalize();
149 //! Appends <other> to me.
151 //! aString = aString + "Dummy"
152 //! Example: aString contains "I say "
153 //! aString = aString + "Hello " + "Dolly"
154 //! gives "I say Hello Dolly"
155 //! To catenate more than one CString, you must put a String before.
156 //! So the following example is WRONG !
157 //! aString = "Hello " + "Dolly" THIS IS NOT ALLOWED
158 //! This rule is applicable to AssignCat (operator +=) too.
159 TCollection_AsciiString Cat (const Standard_Character other) const;
160 TCollection_AsciiString operator + (const Standard_Character other) const
165 //! Appends <other> to me.
167 //! aString = aString + 15;
168 //! Example: aString contains "I say "
170 //! To catenate more than one CString, you must put a String before.
171 //! So the following example is WRONG !
172 //! aString = "Hello " + "Dolly" THIS IS NOT ALLOWED
173 //! This rule is applicable to AssignCat (operator +=) too.
174 TCollection_AsciiString Cat (const Standard_Integer other) const;
175 TCollection_AsciiString operator + (const Standard_Integer other) const
180 //! Appends <other> to me.
182 //! aString = aString + 15.15;
183 //! Example: aString contains "I say "
184 //! gives "I say 15.15"
185 //! To catenate more than one CString, you must put a String before.
186 //! So the following example is WRONG !
187 //! aString = "Hello " + "Dolly" THIS IS NOT ALLOWED
188 //! This rule is applicable to AssignCat (operator +=) too.
189 TCollection_AsciiString Cat (const Standard_Real other) const;
190 TCollection_AsciiString operator + (const Standard_Real other) const
195 //! Appends <other> to me.
197 //! aString = aString + "Dummy"
198 //! Example: aString contains "I say "
199 //! aString = aString + "Hello " + "Dolly"
200 //! gives "I say Hello Dolly"
201 //! To catenate more than one CString, you must put a String before.
202 //! So the following example is WRONG !
203 //! aString = "Hello " + "Dolly" THIS IS NOT ALLOWED
204 //! This rule is applicable to AssignCat (operator +=) too.
205 TCollection_AsciiString Cat (const Standard_CString other) const;
206 TCollection_AsciiString operator + (const Standard_CString other) const
211 //! Appends <other> to me.
212 //! Example: aString = aString + anotherString
213 TCollection_AsciiString Cat (const TCollection_AsciiString& other) const;
214 TCollection_AsciiString operator + (const TCollection_AsciiString& other) const
219 //! Modifies this ASCII string so that its length
220 //! becomes equal to Width and the new characters
221 //! are equal to Filler. New characters are added
222 //! both at the beginning and at the end of this string.
223 //! If Width is less than the length of this ASCII string, nothing happens.
225 //! TCollection_AsciiString
226 //! myAlphabet("abcdef");
227 //! myAlphabet.Center(9,' ');
228 //! assert ( myAlphabet == "
230 Standard_EXPORT void Center (const Standard_Integer Width, const Standard_Character Filler);
232 //! Substitutes all the characters equal to aChar by NewChar
233 //! in the AsciiString <me>.
234 //! The substitution can be case sensitive.
235 //! If you don't use default case sensitive, no matter wether aChar
236 //! is uppercase or not.
237 //! Example: me = "Histake" -> ChangeAll('H','M',Standard_True)
238 //! gives me = "Mistake"
239 Standard_EXPORT void ChangeAll (const Standard_Character aChar, const Standard_Character NewChar, const Standard_Boolean CaseSensitive = Standard_True);
241 //! Removes all characters contained in <me>.
242 //! This produces an empty AsciiString.
243 Standard_EXPORT void Clear();
245 //! Copy <fromwhere> to <me>.
246 //! Used as operator =
247 //! Example: aString = anotherCString;
248 Standard_EXPORT void Copy (const Standard_CString fromwhere);
249 void operator = (const Standard_CString fromwhere)
254 //! Copy <fromwhere> to <me>.
255 //! Used as operator =
256 //! Example: aString = anotherString;
257 Standard_EXPORT void Copy (const TCollection_AsciiString& fromwhere);
258 void operator = (const TCollection_AsciiString& fromwhere)
263 //! Frees memory allocated by AsciiString.
264 Standard_EXPORT void Destroy();
265 ~TCollection_AsciiString()
270 //! Returns the index of the first character of <me> that is
271 //! present in <Set>.
272 //! The search begins to the index FromIndex and ends to the
273 //! the index ToIndex.
274 //! Returns zero if failure.
275 //! Raises an exception if FromIndex or ToIndex is out of range.
277 //! me = "aabAcAa", S = "Aa", FromIndex = 1, Toindex = 7
282 Standard_EXPORT Standard_Integer FirstLocationInSet (const TCollection_AsciiString& Set, const Standard_Integer FromIndex, const Standard_Integer ToIndex) const;
284 //! Returns the index of the first character of <me>
285 //! that is not present in the set <Set>.
286 //! The search begins to the index FromIndex and ends to the
287 //! the index ToIndex in <me>.
288 //! Returns zero if failure.
289 //! Raises an exception if FromIndex or ToIndex is out of range.
291 //! me = "aabAcAa", S = "Aa", FromIndex = 1, Toindex = 7
296 Standard_EXPORT Standard_Integer FirstLocationNotInSet (const TCollection_AsciiString& Set, const Standard_Integer FromIndex, const Standard_Integer ToIndex) const;
298 //! Inserts a Character at position <where>.
300 //! aString contains "hy not ?"
301 //! aString.Insert(1,'W'); gives "Why not ?"
302 //! aString contains "Wh"
303 //! aString.Insert(3,'y'); gives "Why"
304 //! aString contains "Way"
305 //! aString.Insert(2,'h'); gives "Why"
306 Standard_EXPORT void Insert (const Standard_Integer where, const Standard_Character what);
308 //! Inserts a CString at position <where>.
310 //! aString contains "O more"
311 //! aString.Insert(2,"nce"); gives "Once more"
312 Standard_EXPORT void Insert (const Standard_Integer where, const Standard_CString what);
314 //! Inserts a AsciiString at position <where>.
315 Standard_EXPORT void Insert (const Standard_Integer where, const TCollection_AsciiString& what);
317 //! Pushing a string after a specific index in the string <me>.
318 //! Raises an exception if Index is out of bounds.
319 //! - less than 0 (InsertAfter), or less than 1 (InsertBefore), or
320 //! - greater than the number of characters in this ASCII string.
323 //! me = "cde" , Index = 0 , other = "ab"
325 //! me = "abcde" , other = "ab"
326 Standard_EXPORT void InsertAfter (const Standard_Integer Index, const TCollection_AsciiString& other);
328 //! Pushing a string before a specific index in the string <me>.
329 //! Raises an exception if Index is out of bounds.
330 //! - less than 0 (InsertAfter), or less than 1 (InsertBefore), or
331 //! - greater than the number of characters in this ASCII string.
334 //! me = "cde" , Index = 1 , other = "ab"
336 //! me = "abcde" , other = "ab"
337 Standard_EXPORT void InsertBefore (const Standard_Integer Index, const TCollection_AsciiString& other);
339 //! Returns True if the string <me> contains zero character.
340 Standard_EXPORT Standard_Boolean IsEmpty() const;
342 //! Returns true if the characters in this ASCII string
343 //! are identical to the characters in ASCII string other.
344 //! Note that this method is an alias of operator ==.
345 Standard_EXPORT Standard_Boolean IsEqual (const Standard_CString other) const;
346 Standard_Boolean operator == (const Standard_CString other) const
348 return IsEqual(other);
351 //! Returns true if the characters in this ASCII string
352 //! are identical to the characters in ASCII string other.
353 //! Note that this method is an alias of operator ==.
354 Standard_EXPORT Standard_Boolean IsEqual (const TCollection_AsciiString& other) const;
355 Standard_Boolean operator == (const TCollection_AsciiString& other) const
357 return IsEqual(other);
360 //! Returns true if there are differences between the
361 //! characters in this ASCII string and ASCII string other.
362 //! Note that this method is an alias of operator !=
363 Standard_EXPORT Standard_Boolean IsDifferent (const Standard_CString other) const;
364 Standard_Boolean operator != (const Standard_CString other) const
366 return IsDifferent(other);
369 //! Returns true if there are differences between the
370 //! characters in this ASCII string and ASCII string other.
371 //! Note that this method is an alias of operator !=
372 Standard_EXPORT Standard_Boolean IsDifferent (const TCollection_AsciiString& other) const;
373 Standard_Boolean operator != (const TCollection_AsciiString& other) const
375 return IsDifferent(other);
378 //! Returns TRUE if <me> is 'ASCII' less than <other>.
379 Standard_EXPORT Standard_Boolean IsLess (const Standard_CString other) const;
380 Standard_Boolean operator < (const Standard_CString other) const
382 return IsLess(other);
385 //! Returns TRUE if <me> is 'ASCII' less than <other>.
386 Standard_EXPORT Standard_Boolean IsLess (const TCollection_AsciiString& other) const;
387 Standard_Boolean operator < (const TCollection_AsciiString& other) const
389 return IsLess(other);
392 //! Returns TRUE if <me> is 'ASCII' greater than <other>.
393 Standard_EXPORT Standard_Boolean IsGreater (const Standard_CString other) const;
394 Standard_Boolean operator > (const Standard_CString other) const
396 return IsGreater(other);
399 //! Returns TRUE if <me> is 'ASCII' greater than <other>.
400 Standard_EXPORT Standard_Boolean IsGreater (const TCollection_AsciiString& other) const;
401 Standard_Boolean operator > (const TCollection_AsciiString& other) const
403 return IsGreater(other);
406 //! Converts a AsciiString containing a numeric expression to
408 //! Example: "215" returns 215.
409 Standard_EXPORT Standard_Integer IntegerValue() const;
411 //! Returns True if the AsciiString contains an integer value.
412 //! Note: an integer value is considered to be a real value as well.
413 Standard_EXPORT Standard_Boolean IsIntegerValue() const;
415 //! Returns True if the AsciiString contains a real value.
416 //! Note: an integer value is considered to be a real value as well.
417 Standard_EXPORT Standard_Boolean IsRealValue() const;
419 //! Returns True if the AsciiString contains only ASCII characters
420 //! between ' ' and '~'.
421 //! This means no control character and no extended ASCII code.
422 Standard_EXPORT Standard_Boolean IsAscii() const;
424 //! Removes all space characters in the begining of the string.
425 Standard_EXPORT void LeftAdjust();
428 //! Length becomes equal to Width and the new characters are
430 //! If Width < Length nothing happens.
431 //! Raises an exception if Width is less than zero.
434 //! me = "abcdef" , Width = 9 , Filler = ' '
437 Standard_EXPORT void LeftJustify (const Standard_Integer Width, const Standard_Character Filler);
439 //! Returns number of characters in <me>.
440 //! This is the same functionality as 'strlen' in C.
442 //! TCollection_AsciiString myAlphabet("abcdef");
443 //! assert ( myAlphabet.Length() == 6 );
444 //! - 1 is the position of the first character in this string.
445 //! - The length of this string gives the position of its last character.
446 //! - Positions less than or equal to zero, or
447 //! greater than the length of this string are
448 //! invalid in functions which identify a character
449 //! of this string by its position.
450 Standard_Integer Length() const;
452 //! Returns an index in the string <me> of the first occurence
453 //! of the string S in the string <me> from the starting index
454 //! FromIndex to the ending index ToIndex
455 //! returns zero if failure
456 //! Raises an exception if FromIndex or ToIndex is out of range.
459 //! me = "aabAaAa", S = "Aa", FromIndex = 1, ToIndex = 7
464 Standard_EXPORT Standard_Integer Location (const TCollection_AsciiString& other, const Standard_Integer FromIndex, const Standard_Integer ToIndex) const;
466 //! Returns the index of the nth occurence of the character C
467 //! in the string <me> from the starting index FromIndex to the
468 //! ending index ToIndex.
469 //! Returns zero if failure.
470 //! Raises an exception if FromIndex or ToIndex is out of range.
473 //! me = "aabAa", N = 3, C = 'a', FromIndex = 1, ToIndex = 5
478 Standard_EXPORT Standard_Integer Location (const Standard_Integer N, const Standard_Character C, const Standard_Integer FromIndex, const Standard_Integer ToIndex) const;
480 //! Converts <me> to its lower-case equivalent.
482 //! TCollection_AsciiString myString("Hello Dolly");
483 //! myString.UpperCase();
484 //! assert ( myString == "HELLO DOLLY" );
485 //! myString.LowerCase();
486 //! assert ( myString == "hello dolly" );
487 Standard_EXPORT void LowerCase();
489 //! Inserts the string other at the beginning of this ASCII string.
491 //! TCollection_AsciiString myAlphabet("cde");
492 //! TCollection_AsciiString myBegin("ab");
493 //! myAlphabet.Prepend(myBegin);
494 //! assert ( myAlphabet == "abcde" );
495 Standard_EXPORT void Prepend (const TCollection_AsciiString& other);
497 //! Displays <me> on a stream.
498 Standard_EXPORT void Print (Standard_OStream& astream) const;
499 friend Standard_EXPORT Standard_OStream& operator << (Standard_OStream& astream,const TCollection_AsciiString& astring);
501 //! Read <me> from a stream.
502 Standard_EXPORT void Read (Standard_IStream& astream);
503 friend Standard_EXPORT Standard_IStream& operator >> (Standard_IStream& astream, TCollection_AsciiString& astring);
505 //! Converts an AsciiString containing a numeric expression.
507 //! Example: ex: "215" returns 215.0.
508 //! ex: "3.14159267" returns 3.14159267.
509 Standard_EXPORT Standard_Real RealValue() const;
511 //! Remove all the occurences of the character C in the string.
514 //! me = "HellLLo", C = 'L' , CaseSensitive = True
517 Standard_EXPORT void RemoveAll (const Standard_Character C, const Standard_Boolean CaseSensitive);
519 //! Removes every <what> characters from <me>.
520 Standard_EXPORT void RemoveAll (const Standard_Character what);
522 //! Erases <ahowmany> characters from position <where>,
523 //! <where> included.
525 //! aString contains "Hello"
526 //! aString.Remove(2,2) erases 2 characters from position 2
527 //! This gives "Hlo".
528 Standard_EXPORT void Remove (const Standard_Integer where, const Standard_Integer ahowmany = 1);
530 //! Removes all space characters at the end of the string.
531 Standard_EXPORT void RightAdjust();
534 //! Length becomes equal to Width and the new characters are
536 //! if Width < Length nothing happens.
537 //! Raises an exception if Width is less than zero.
540 //! me = "abcdef" , Width = 9 , Filler = ' '
543 Standard_EXPORT void RightJustify (const Standard_Integer Width, const Standard_Character Filler);
545 //! Searches a CString in <me> from the beginning
546 //! and returns position of first item <what> matching.
547 //! it returns -1 if not found.
549 //! aString contains "Sample single test"
550 //! aString.Search("le") returns 5
551 Standard_EXPORT Standard_Integer Search (const Standard_CString what) const;
553 //! Searches an AsciiString in <me> from the beginning
554 //! and returns position of first item <what> matching.
555 //! It returns -1 if not found.
556 Standard_EXPORT Standard_Integer Search (const TCollection_AsciiString& what) const;
558 //! Searches a CString in a AsciiString from the end
559 //! and returns position of first item <what> matching.
560 //! It returns -1 if not found.
562 //! aString contains "Sample single test"
563 //! aString.SearchFromEnd("le") returns 12
564 Standard_EXPORT Standard_Integer SearchFromEnd (const Standard_CString what) const;
566 //! Searches a AsciiString in another AsciiString from the end
567 //! and returns position of first item <what> matching.
568 //! It returns -1 if not found.
569 Standard_EXPORT Standard_Integer SearchFromEnd (const TCollection_AsciiString& what) const;
571 //! Replaces one character in the AsciiString at position <where>.
572 //! If <where> is less than zero or greater than the length of <me>
573 //! an exception is raised.
575 //! aString contains "Garbake"
576 //! astring.Replace(6,'g') gives <me> = "Garbage"
577 Standard_EXPORT void SetValue (const Standard_Integer where, const Standard_Character what);
579 //! Replaces a part of <me> by a CString.
580 //! If <where> is less than zero or greater than the length of <me>
581 //! an exception is raised.
583 //! aString contains "abcde"
584 //! aString.SetValue(4,"1234567") gives <me> = "abc1234567"
585 Standard_EXPORT void SetValue (const Standard_Integer where, const Standard_CString what);
587 //! Replaces a part of <me> by another AsciiString.
588 Standard_EXPORT void SetValue (const Standard_Integer where, const TCollection_AsciiString& what);
590 //! Splits a AsciiString into two sub-strings.
592 //! aString contains "abcdefg"
593 //! aString.Split(3) gives <me> = "abc" and returns "defg"
594 Standard_EXPORT TCollection_AsciiString Split (const Standard_Integer where);
596 //! Creation of a sub-string of the string <me>.
597 //! The sub-string starts to the index Fromindex and ends
598 //! to the index ToIndex.
599 //! Raises an exception if ToIndex or FromIndex is out of bounds
602 //! me = "abcdefg", ToIndex=3, FromIndex=6
607 TCollection_AsciiString SubString (const Standard_Integer FromIndex, const Standard_Integer ToIndex) const;
609 //! Returns pointer to AsciiString (char *).
610 //! This is useful for some casual manipulations.
611 //! Warning: Because this "char *" is 'const', you can't modify its contents.
612 Standard_CString ToCString() const;
614 //! Extracts <whichone> token from <me>.
615 //! By default, the <separators> is set to space and tabulation.
616 //! By default, the token extracted is the first one (whichone = 1).
617 //! <separators> contains all separators you need.
618 //! If no token indexed by <whichone> is found, it returns empty AsciiString.
620 //! aString contains "This is a message"
621 //! aString.Token() returns "This"
622 //! aString.Token(" ",4) returns "message"
623 //! aString.Token(" ",2) returns "is"
624 //! aString.Token(" ",9) returns ""
625 //! Other separators than space character and tabulation are allowed :
626 //! aString contains "1234; test:message , value"
627 //! aString.Token("; :,",4) returns "value"
628 //! aString.Token("; :,",2) returns "test"
629 Standard_EXPORT TCollection_AsciiString Token (const Standard_CString separators = " \t", const Standard_Integer whichone = 1) const;
631 //! Truncates <me> to <ahowmany> characters.
632 //! Example: me = "Hello Dolly" -> Trunc(3) -> me = "Hel"
633 Standard_EXPORT void Trunc (const Standard_Integer ahowmany);
635 //! Converts <me> to its upper-case equivalent.
636 Standard_EXPORT void UpperCase();
638 //! Length of the string ignoring all spaces (' ') and the
639 //! control character at the end.
640 Standard_EXPORT Standard_Integer UsefullLength() const;
642 //! Returns character at position <where> in <me>.
643 //! If <where> is less than zero or greater than the lenght of <me>,
644 //! an exception is raised.
646 //! aString contains "Hello"
647 //! aString.Value(2) returns 'e'
648 Standard_EXPORT Standard_Character Value (const Standard_Integer where) const;
650 //! Hash function for AsciiString
651 //! (returns the same Integer value that the hash function for ExtendedString)
652 static Standard_Integer HashCode (const TCollection_AsciiString& astring, const Standard_Integer Upper);
654 //! Returns True when the two strings are the same.
655 //! (Just for HashCode for AsciiString)
656 static Standard_Boolean IsEqual (const TCollection_AsciiString& string1, const TCollection_AsciiString& string2);
658 //! Returns True when the two strings are the same.
659 //! (Just for HashCode for AsciiString)
660 static Standard_Boolean IsEqual (const TCollection_AsciiString& string1, const Standard_CString string2);
663 friend class TCollection_HAsciiString;
675 Standard_EXPORT void Split (const Standard_Integer where, TCollection_AsciiString& result);
677 Standard_EXPORT void SubString (const Standard_Integer FromIndex, const Standard_Integer ToIndex, TCollection_AsciiString& result) const;
679 Standard_EXPORT void Token (const Standard_CString separators, const Standard_Integer whichone, TCollection_AsciiString& result) const;
682 Standard_PCharacter mystring;
683 Standard_Integer mylength;
689 #include <TCollection_AsciiString.lxx>
695 #endif // _TCollection_AsciiString_HeaderFile