18 #ifndef _DECAF_LANG_STRING_H_
19 #define _DECAF_LANG_STRING_H_
34 class AbstractStringBuilder;
60 mutable Contents* contents;
82 String(
const char value,
int count);
98 String(
const std::string& source);
110 String(
const char* array);
126 String(
const char* array,
int size);
144 String(
const char* array,
int offset,
int length);
165 String(
const char* array,
int size,
int offset,
int length);
193 String& operator= (
const std::string& other);
205 String& operator= (
const char* other);
218 bool operator==(
const std::string& other)
const;
231 bool operator!=(
const std::string& other)
const;
242 bool operator< (
const char* other)
const;
244 bool operator< (
const std::string& other)
const;
257 bool operator<=(
const std::string& other)
const;
268 bool operator> (
const char* other)
const;
270 bool operator> (
const std::string& other)
const;
283 bool operator>=(
const std::string& other)
const;
295 String operator+ (
const std::string& other)
const;
296 String operator+ (
const char* other)
const;
308 const char* c_str()
const;
343 int compareTo(
const String&
string)
const;
362 int compareTo(
const std::string&
string)
const;
383 int compareTo(
const char*
string)
const;
398 int compareToIgnoreCase(
const String&
string)
const;
413 int compareToIgnoreCase(
const std::string&
string)
const;
430 int compareToIgnoreCase(
const char*
string)
const;
452 String concat(
const std::string&
string)
const;
463 String concat(
const char*
string)
const;
475 bool contains(
const String&
string)
const;
487 bool contains(
const std::string&
string)
const;
499 bool contains(
const char*
string)
const;
510 bool endsWith(
const String& suffix)
const;
520 bool equals(
const String& other)
const;
530 bool equals(
const std::string& other)
const;
542 bool equals(
const char* other)
const;
553 bool equalsIgnoreCase(
const String&
string)
const;
564 bool equalsIgnoreCase(
const std::string&
string)
const;
575 bool equalsIgnoreCase(
const char*
string)
const;
588 int findFirstOf(
const String& chars)
const;
603 int findFirstOf(
const String& chars,
int start)
const;
616 int findFirstNotOf(
const String& chars)
const;
631 int findFirstNotOf(
const String& chars,
int start)
const;
655 void getChars(
int srcBegin,
int srcEnd,
char* dest,
int destSize,
int destBegin)
const;
663 int hashCode()
const;
676 int indexOf(
char value)
const;
695 int indexOf(
char value,
int start)
const;
708 int indexOf(
const String&
string)
const;
723 int indexOf(
const String& subString,
int start)
const;
736 int indexOf(
const std::string&
string)
const;
751 int indexOf(
const std::string& subString,
int start)
const;
764 int indexOf(
const char*
string)
const;
779 int indexOf(
const char* subString,
int start)
const;
784 bool isEmpty()
const;
797 int lastIndexOf(
char value)
const;
812 int lastIndexOf(
char value,
int start)
const;
825 int lastIndexOf(
const String&
string)
const;
840 int lastIndexOf(
const String& subString,
int start)
const;
853 int lastIndexOf(
const std::string&
string)
const;
868 int lastIndexOf(
const std::string& subString,
int start)
const;
881 int lastIndexOf(
const char*
string)
const;
896 int lastIndexOf(
const char* subString,
int start)
const;
915 bool regionMatches(
int thisStart,
const String&
string,
int start,
int length)
const;
935 bool regionMatches(
bool ignoreCase,
int thisStart,
const String&
string,
int start,
int length)
const;
948 String replace(
char oldChar,
char newChar)
const;
960 bool startsWith(
const String& prefix)
const;
974 bool startsWith(
const String& prefix,
int start)
const;
987 String substring(
int start)
const;
1003 String substring(
int start,
int end)
const;
1015 char* toCharArray()
const;
1024 String toLowerCase()
const;
1033 String toUpperCase()
const;
1047 virtual int length()
const;
1052 virtual char charAt(
int index)
const;
1057 virtual CharSequence* subSequence(
int start,
int end)
const;
1062 virtual std::string toString()
const;
1078 static String copyValueOf(
const char* data);
1098 static String copyValueOf(
char* data,
int start,
int length);
1106 static bool isNullOrEmpty(
const char*);
1116 static String valueOf(
bool value);
1126 static String valueOf(
char value);
1136 static String valueOf(
float value);
1146 static String valueOf(
double value);
1156 static String valueOf(
short value);
1166 static String valueOf(
int value);
1176 static String valueOf(
long long value);
1185 void getChars(
int start,
int end,
char* buffer,
int index)
const;
1187 String(Contents* content);
A CharSequence is a readable sequence of char values.
Definition: CharSequence.h:36
bool operator>(const std::string &left, const String &right)
A modifiable sequence of characters for use in creating and modifying Strings.
Definition: AbstractStringBuilder.h:40
Decaf's implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the defa...
Definition: ArrayPointer.h:51
An immutable sequence of characters.
Definition: String.h:57
#define DECAF_API
Definition: Config.h:29
bool operator<=(const std::string &left, const String &right)
std::ostream & operator<<(std::ostream &out, const Pointer< T, R > &pointer)
Definition: Pointer.h:348
bool operator!=(const ArrayPointer< T > &left, const U *right)
Definition: ArrayPointer.h:391
bool operator>=(const std::string &left, const String &right)
bool operator==(const ArrayPointer< T > &left, const U *right)
Definition: ArrayPointer.h:379
bool operator<(const std::string &left, const String &right)