18#ifndef _DECAF_LANG_STRING_H_
19#define _DECAF_LANG_STRING_H_
60 mutable Contents* contents;
193 String& operator= (
const std::string& other);
242 bool operator< (
const char* other)
const;
243 bool operator< (
const String& other)
const;
244 bool operator< (
const std::string& other)
const;
268 bool operator> (
const char* other)
const;
269 bool operator> (
const String& other)
const;
270 bool operator> (
const std::string& other)
const;
295 String operator+ (
const std::string& other)
const;
296 String operator+ (
const char* other)
const;
530 bool equals(
const std::string& other)
const;
655 void getChars(
int srcBegin,
int srcEnd,
char* dest,
int destSize,
int destBegin)
const;
751 int indexOf(
const std::string& subString,
int start)
const;
779 int indexOf(
const char* subString,
int start)
const;
1185 void getChars(
int start,
int end,
char* buffer,
int index)
const;
1187 String(Contents* content);
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
A CharSequence is a readable sequence of char values.
Definition CharSequence.h:36
An immutable sequence of characters.
Definition String.h:57
String toUpperCase() const
Converts the characters in this string to upper case.
virtual int length() const
the length of the underlying character sequence.
int compareTo(const std::string &string) const
Compares two strings lexicographically.
bool operator!=(const String &other) const
String(const char *array, int size, int offset, int length)
Create a new String object that represents the given array of characters.
bool operator<=(const String &other) const
static String valueOf(bool value)
Returns a String that represents the value of the given boolean value.
String concat(const char *string) const
Concatenates this string and the specified C string.
bool equals(const String &other) const
Returns true if this String is equal to the given String instance.
String substring(int start) const
Copies a range of characters into a new string starting from the given offset and extending to the en...
bool regionMatches(int thisStart, const String &string, int start, int length) const
Compares the specified string to this string and compares the specified range of characters to determ...
char * toCharArray() const
Copies the characters in this string to a newly allocated character array.
bool contains(const String &string) const
Determines if this String contains the sequence of characters in the String passed in.
int findFirstNotOf(const String &chars, int start) const
Searches in this string for the first index of any character that is not in the specified String.
bool operator!=(const std::string &other) const
bool operator>=(const std::string &other) const
int findFirstNotOf(const String &chars) const
Searches in this string for the first index of any character that is not in the specified String.
bool regionMatches(bool ignoreCase, int thisStart, const String &string, int start, int length) const
Compares the specified string to this string and compares the specified range of characters to determ...
int indexOf(const String &subString, int start) const
Searches in this string for the index of the specified string.
static String valueOf(int value)
Returns a String that represents the value of the given integer value.
int compareTo(const char *string) const
Compares two strings lexicographically.
String replace(char oldChar, char newChar) const
Copies this string replacing occurrences of the specified character with another character.
bool startsWith(const String &prefix, int start) const
Compares the specified string to this string, starting at the specified offset, to determine if the s...
int indexOf(const char *string) const
Searches in this String for the first index of the specified C string.
String trim() const
Returns a copy of the string, with leading and trailing whitespace omitted.
int compareToIgnoreCase(const String &string) const
Compares two strings lexicographically, ignoring case differences.
void getChars(int srcBegin, int srcEnd, char *dest, int destSize, int destBegin) const
Copies characters from this String into the destination char array, starting from the given index.
String concat(const String &string) const
Concatenates this string and the specified string.
virtual char charAt(int index) const
Returns the Char at the specified index so long as the index is not greater than the length of the se...
bool equals(const char *other) const
Returns true if this String is equal to the given C string instance.
int indexOf(const std::string &subString, int start) const
Searches in this string for the index of the specified std::string.
String(const char *array)
Create a new String object that represents the given array of characters, the C string must be null t...
int compareToIgnoreCase(const std::string &string) const
Compares two strings lexicographically, ignoring case differences.
int compareToIgnoreCase(const char *string) const
Compares two strings lexicographically, ignoring case differences.
String()
Creates a new empty String object.
bool operator<=(const char *other) const
Comparison operators for the various string types that uses the compareTo method to determine if the ...
int indexOf(const std::string &string) const
Searches in this String for the first index of the specified std::string.
virtual std::string toString() const
the String representation of this CharSequence
bool operator>=(const String &other) const
int lastIndexOf(char value) const
Searches in this string for the last index of the specified character.
String substring(int start, int end) const
Copies a range of characters into a new string.
static String valueOf(char value)
Returns a String that represents the value of the given char value.
int lastIndexOf(const String &string) const
Searches in this string for the last index of the specified string.
bool equalsIgnoreCase(const String &string) const
Compares the specified string to this string ignoring the case of the characters and returns true if ...
int compareTo(const String &string) const
Compares two strings lexicographically.
bool contains(const char *string) const
Determines if this String contains the sequence of characters in the C String passed in.
int indexOf(char value) const
Searches in this string for the first index of the specified character.
static String valueOf(float value)
Returns a String that represents the value of the given float value.
bool equalsIgnoreCase(const char *string) const
Compares the specified C string to this string ignoring the case of the characters and returns true i...
int lastIndexOf(const String &subString, int start) const
Searches in this string for the index of the specified string.
bool operator==(const std::string &other) const
int indexOf(char value, int start) const
Searches in this string for the index of the specified character.
bool operator>=(const char *other) const
Comparison operators for the various string types that uses the compareTo method to determine if the ...
int findFirstOf(const String &chars, int start) const
Searches in this string for the first index of any character in the specified String.
String concat(const std::string &string) const
Concatenates this string and the specified std::string.
int lastIndexOf(char value, int start) const
Searches in this string for the index of the specified character.
virtual CharSequence * subSequence(int start, int end) const
Returns a new CharSequence that is a subsequence of this sequence.The subsequence starts with the cha...
bool operator<=(const std::string &other) const
bool operator==(const String &other) const
int indexOf(const char *subString, int start) const
Searches in this string for the index of the specified C string.
int lastIndexOf(const char *subString, int start) const
Searches in this string for the index of the specified C string.
int findFirstOf(const String &chars) const
Searches in this string for the first index of any character in the specified String.
String(const String &source)
Create a new String object that represents the given STL string.
int lastIndexOf(const std::string &string) const
Searches in this string for the last index of the specified std::string.
bool operator==(const char *other) const
Comparison operators for the various string types that uses the equals method to determine equality.
bool endsWith(const String &suffix) const
Compares the specified string to this string to determine if the specified string is a suffix.
static bool isNullOrEmpty(const char *)
Given a C String pointer return true if the value is either NULL or the string contained is empty.
bool contains(const std::string &string) const
Determines if this String contains the sequence of characters in the std::string passed in.
bool operator!=(const char *other) const
Comparison operators for the various string types that uses the equals method to determine equality.
String compact() const
If the String instance is holding a reference to a character array that is larger than the string's v...
bool equals(const std::string &other) const
Returns true if this String is equal to the given std::string instance.
String(const char value, int count)
Create a new String instance that contains N copies of the given character value.
static String copyValueOf(const char *data)
Creates a new string containing the characters in the specified character array.
String toLowerCase() const
Converts the characters in this string to lower case.
friend class AbstractStringBuilder
Definition String.h:1190
static String copyValueOf(char *data, int start, int length)
Creates a new string containing the specified characters in the character array.
static String valueOf(short value)
Returns a String that represents the value of the given short value.
int indexOf(const String &string) const
Searches in this string for the first index of the specified string.
int lastIndexOf(const char *string) const
Searches in this string for the last index of the specified C string.
bool equalsIgnoreCase(const std::string &string) const
Compares the specified std::string to this String ignoring the case of the characters and returns tru...
int hashCode() const
Returns a hash code for this String instance, the hash code for an empty String will always be zero.
const char * c_str() const
Returns a const char* value to allow easier coexistence with standard c++ string operations.
static String valueOf(long long value)
Returns a String that represents the value of the given 64bit long value.
String(const std::string &source)
Create a new String object that represents the given STL string.
int lastIndexOf(const std::string &subString, int start) const
Searches in this string for the index of the specified std::string.
bool startsWith(const String &prefix) const
Compares the specified string to this string to determine if the specified string is a prefix.
static String valueOf(double value)
Returns a String that represents the value of the given double value.
String(const char *array, int offset, int length)
Create a new String object that represents the given array of characters, the C string must be null t...
String(const char *array, int size)
Create a new String object that represents the given array of characters.
#define DECAF_API
Definition Config.h:29
Definition ThreadingTypes.h:31
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:379
bool operator>=(const std::string &left, const String &right)
bool operator<=(const std::string &left, const String &right)
bool operator<(const std::string &left, const String &right)
bool operator>(const std::string &left, const String &right)
bool operator!=(const ArrayPointer< T > &left, const U *right)
Definition ArrayPointer.h:391
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25