18#ifndef _DECAF_LANG_ABSTRACTSTRINGBUILDER_H_
19#define _DECAF_LANG_ABSTRACTSTRINGBUILDER_H_
29 class AbstractStringBuilderImpl;
47 AbstractStringBuilderImpl* impl;
82 virtual char charAt(
int index)
const;
120 virtual void getChars(
int start,
int end,
char* dst,
int dstSize,
int dstStart)
const;
420 void doInsert(
int index,
const std::string& value);
A convenience class used by some Decaf classes to implement the Synchronizable interface when there i...
Definition SynchronizableImpl.h:36
void doDeleteRange(int start, int end)
Delete the characters in the range start - end.
virtual int indexOf(const String &value, int start) const
Search for the index within this string of the first occurrence of the specified substring starting a...
void doInsert(int index, char value)
Inserts a single char value at the given index.
virtual int length() const
Returns the current length of the String that has been built.
void doReverse()
Reverses the characters contained in this character buffer.
virtual CharSequence * subSequence(int start, int end) const
Creates and returns a new CharSequence object that is a subset of the characters contained in this ch...
virtual ~AbstractStringBuilder()
void doAppend(const CharSequence *value)
Appends the given CharSequence to this buffer.
AbstractStringBuilder(const String &source)
void doInsert(int index, const CharSequence *value, int start, int end)
Inserts the given CharSequence at the given index in this buffer starting at the given index and endi...
void doDeleteCharAt(int index)
Deletes the character at the given index from this buffer.
void doAppend(const std::string &value)
Append the given std::string to this buffer.
AbstractStringBuilder(const std::string &source)
virtual char charAt(int index) const
Returns the character at the given index.
virtual String substring(int start, int end) const
Returns a new String that contains a subset of the characters currently contained in this character b...
void doAppend(const CharSequence *value, int offset, int length)
Appends the given CharSequence to this buffer starting at the given offset and ending after the lengt...
virtual void getChars(int start, int end, char *dst, int dstSize, int dstStart) const
Copies characters from this character buffer into the given character array.
void doInsert(int index, const std::string &value)
Inserts a std::string value at the given index.
virtual int lastIndexOf(const String &value, int start) const
Search for the last index within this string where the given substring can be found starting from the...
virtual int capacity() const
Returns the current capacity.
AbstractStringBuilder(const CharSequence *source)
void doReplace(int start, int end, const String &value)
Replace some number of characters in this Buffer with the value given.
virtual void setCharAt(int index, char value)
Sets the character at the specified index to the new char value given.
void doAppend(const char value)
Appends the given char to this buffer.
virtual void trimToSize()
Attempts to reduce storage used for the character sequence.
void doAppend(const AbstractStringBuilder &value)
Append the given AbstractStringBuilder to this buffer.
virtual int indexOf(const String &value) const
Search for the index within this string of the first occurrence of the specified substring.
virtual void setLength(int length)
Sets the length of this character buffer.
virtual String substring(int start) const
Returns a new String that contains a subset of the characters currently contained in this character b...
static const int INITIAL_CAPACITY
Definition AbstractStringBuilder.h:43
virtual String toString() const
Returns a String that represents the contents of this buffer.
virtual void ensureCapacity(int minCapacity)
Ensures that the capacity is at least equal to the specified min value.
void doInsert(int index, const CharSequence *value)
Inserts the given CharSequence at the given index in this buffer.
void doInsert(int index, const String &value)
Inserts a String value at the given index.
void doAppend(const String &value)
Append the given String to this buffer.
virtual int lastIndexOf(const String &value) const
Search for the last index within this string where the given substring can be found.
AbstractStringBuilder(int capacity)
void doAppendNull()
Appends the string "null" to the current character buffer.
void doAppend(const char *value, int offset, int length)
Appends the given C string to this buffer starting at the given offset and ending after the length nu...
void doAppend(const char *value)
Appends the given C string to this buffer.
void doInsert(int index, const char *value, int offset, int length)
Inserts the given C string at the given index in this buffer starting at the given offset and ending ...
void doInsert(int index, const char *value)
Inserts a C string value at the given index.
A CharSequence is a readable sequence of char values.
Definition CharSequence.h:36
An immutable sequence of characters.
Definition String.h:57
#define DECAF_API
Definition Config.h:29
Definition ThreadingTypes.h:31
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25