RLib  5.7
RLib - an opensource, lightweight and multi-platform framework for cpp programming
System::StringArray Class Reference

Represents a collection of strings (specialized Array<String>) More...

Inheritance diagram for System::StringArray:
System::Collections::Generic::Array< String >

Public Member Functions

 StringArray (intptr_t length=RLIB_DEFAULT_CAPACITY)
 
 StringArray (const String items[], intptr_t length)
 
 StringArray (const StringArray &)=default
 
String Join (const String &separator)
 Concatenates all the elements of the string array, using the specified separator between each element More...
 
- Public Member Functions inherited from System::Collections::Generic::Array< String >
 Array (intptr_t length=RLIB_DEFAULT_CAPACITY)
 
 Array (const Standard::initializer_list< const String > &data)
 Initializes Array<Of R> using initializer-list More...
 
 Array (const Stringitems[], intptr_t length)
 
 Array (const Array &array_from)
 
Arrayoperator= (const Array &obj)
 
Arrayoperator+= (const String &item)
 
RLIB_FORCE_INLINE StringGetType () const
 Gets the Type of the current instance More...
 
void InitStorage (intptr_t n)
 Requests that the Array<Of R> be at least enough to contain n elements More...
 
intptr_t Add (P &&...args)
 Adds specified item and returns the index of the added. More...
 
intptr_t AddRange (const String &item, const P &...args)
 Adds the specified items and returns the index of the first added. More...
 
intptr_t AddRange (const Stringitems[], intptr_t count)
 Adds the specified items and returns the index of the first added. More...
 
intptr_t AddRange (const String(&items)[N])
 Adds the specified items and returns the index of the first added. More...
 
void Clear ()
 Removes all elements from the Array<Of R> More...
 
Stringoperator[] (intptr_t index) const
 Gets the element at the specified location More...
 
StringGetValue (intptr_t index) const
 Gets the element at the specified location More...
 
bool Contains (const String &item) const
 确定某元素是否在当前 Array<Of R> 中 More...
 
intptr_t IndexOf (const String &item, typename IComparer< String >::EqualsDelegate equals, intptr_t begin=0) const
 搜索指定的对象,并返回整个 Array<Of R> 中第一个匹配项的索引 More...
 
intptr_t IndexOf (const String &item, intptr_t begin=0) const
 搜索指定的对象,并返回整个 Array<Of R> 中第一个匹配项的索引 More...
 
intptr_t LastIndexOf (const String &item, typename IComparer< String >::EqualsDelegate equals, intptr_t rbegin=0) const
 搜索指定的对象,并返回整个 Array<Of R> 中最后一个匹配项的索引 More...
 
intptr_t LastIndexOf (const String &item, intptr_t rbegin=0) const
 搜索指定的对象,并返回整个 Array<Of R> 中最后一个匹配项的索引 More...
 
void Remove (const String &item, typename IComparer< String >::EqualsDelegate equals)
 移除特定元素的第一个匹配项 More...
 
void Remove (const String &item)
 移除特定元素的第一个匹配项 More...
 
void RemoveAll (const String &item)
 移除特定元素的所有匹配项 More...
 
void RemoveAt (intptr_t index)
 移除指定索引处的元素 More...
 
intptr_t BinarySearch (const String &item, typename IComparer< String >::Delegate comparer, intptr_t begin=0) const
 Searches an entire one-dimensional sorted array for a value using the specified IComparer interface. More...
 
intptr_t BinarySearch (const String &item, intptr_t begin=0) const
 Searches an entire one-dimensional sorted array for a value using the specified IComparer interface. More...
 
void Sort (typename IComparer< String >::Delegate comparer, intptr_t begin=0, intptr_t count=-1)
 Sorts the elements in the entire Array<Of R> using the IComparable generic interface implementation. This method uses the QuickSort algorithm, which on average, is an O(n log n) operation; in the worst case it is an O(n ^ 2) operation More...
 
void Sort (intptr_t begin=0, intptr_t count=-1)
 Sorts the elements in the entire Array<Of R> O(N·log(N)) More...
 
void Unique (typename IComparer< String >::EqualsDelegate equals)
 删除 Array<Of R> 中所有重复的相邻元素 More...
 
void Unique ()
 删除 Array<Of R> 中所有重复的相邻元素 More...
 
void Insert (intptr_t index, const String &item)
 插入新元素到指定位置 More...
 
void Reverse (intptr_t begin=0)
 将指定范围中元素的顺序反转 More...
 
void CopyTo (collection_t &obj) const
 将 Array<Of R> 完全拷贝至指定集合处 More...
 
void MoveTo (Array &obj)
 将 Array<Of R> 完全转移至另一 Array<Of R> 处 More...
 
void WriteToEnd (const String *data, intptr_t count)
 将指定数组浅拷贝至当前 Array<Of R> More...
 
StringToByteArray ()
 获取 Array<Of R> 数据存储区指针 More...
 
intptr_t GetByteArrayLength ()
 获取 Array<Of R> 数据存储区有效数据段大小(in bytes) More...
 
intptr_t GetByteArraySize ()
 获取 Array<Of R> 数据存储区总可读写大小(in bytes) More...
 
RLIB_INLINE intptr_t GetByteArrayItemSize ()
 获取 Array<Of R> 数据存储区每个有效数据元素大小(in bytes) More...
 
Stringbegin ()
 Returns an iterator to the first element of the container. If the container is empty or nothing, the returned iterator will be equal to end() More...
 
const Stringbegin () const
 
Stringend ()
 Returns an iterator to the element following the last element of the container. This element acts as a placeholder; attempting to access it results in undefined behavior. More...
 
const Stringend () const
 

Public Attributes

 RLIB_DECLARE_DYNCREATE
 
- Public Attributes inherited from System::Collections::Generic::Array< String >
intptr_t Length
 Gets the total number of elements of the Array<Of R> More...
 
intptr_t MaxLength
 Gets the maximum capacity of the Array<Of R> without reallocating memory More...
 
 RLIB_DECLARE_DYNCREATE
 

Additional Inherited Members

- Public Types inherited from System::Collections::Generic::Array< String >
typedef String Type
 Represents the Type of the current instance More...
 
- Protected Attributes inherited from System::Collections::Generic::Array< String >
Stringm_pItems
 

Detailed Description

Represents a collection of strings (specialized Array<String>)

Member Function Documentation

String StringArray::Join ( const String separator)

Concatenates all the elements of the string array, using the specified separator between each element


The documentation for this class was generated from the following files: