18 #ifndef _DECAF_LANG_STRINGBUFFER_H_
19 #define _DECAF_LANG_STRINGBUFFER_H_
102 virtual int capacity()
const;
104 virtual char charAt(
int index)
const;
106 virtual void ensureCapacity(
int minCapacity);
108 virtual void getChars(
int start,
int end,
char* dst,
int dstSize,
int dstStart)
const;
110 virtual int indexOf(
const String& value)
const;
112 virtual int indexOf(
const String& value,
int start)
const;
114 virtual int lastIndexOf(
const String& value)
const;
116 virtual int lastIndexOf(
const String& value,
int start)
const;
118 virtual int length()
const;
120 virtual void setLength(
int length);
122 virtual void setCharAt(
int index,
char value);
124 virtual String substring(
int start)
const;
126 virtual String substring(
int start,
int end)
const;
128 virtual CharSequence* subSequence(
int start,
int end)
const;
130 virtual String toString()
const;
132 virtual void trimToSize();
145 template<
typename POINTER>
148 if (pointer ==
NULL) {
151 doAppend(pointer->toString());
166 template<
typename TYPE>
169 if (pointer ==
NULL) {
172 doAppend(pointer->toString());
272 StringBuffer& append(
const char* value,
int offset,
int length);
364 template<
typename POINTER>
367 if (pointer ==
NULL) {
368 doInsert(index,
"null");
370 doInsert(index, pointer->toString());
387 template<
typename TYPE>
390 if (pointer ==
NULL) {
391 doInsert(index,
"null");
393 doInsert(index, pointer->toString());
557 StringBuffer& insert(
int index,
const std::string& value);
580 StringBuffer& insert(
int index,
const char* value,
int offset,
int length);
A CharSequence is a readable sequence of char values.
Definition: CharSequence.h:36
#define NULL
Definition: Config.h:33
StringBuffer & insert(int index, const Pointer< TYPE > pointer)
Inserts the string representation of the given object pointer.
Definition: StringBuffer.h:388
An object to which char sequences and values can be appended.
Definition: Appendable.h:42
StringBuffer & insert(int index, const POINTER *pointer)
Inserts the string representation of the given object pointer.
Definition: StringBuffer.h:365
A modifiable sequence of characters for use in creating and modifying Strings.
Definition: AbstractStringBuilder.h:40
An immutable sequence of characters.
Definition: String.h:57
#define DECAF_API
Definition: Config.h:29
StringBuffer is a variable size contiguous indexable array of characters.
Definition: StringBuffer.h:57
A modifiable sequence of characters for use in creating and modifying Strings.
Definition: StringBuilder.h:51
Decaf's implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the defa...
Definition: Pointer.h:53
StringBuffer & append(const POINTER *pointer)
Appends the string representation of the given object pointer.
Definition: StringBuffer.h:146
StringBuffer & append(const Pointer< TYPE > pointer)
Appends the string representation of the given object pointer.
Definition: StringBuffer.h:167