StringLineGroup Struct
- Implements
Nested types
| Name | Description |
|---|---|
| StringLineGroup.Enumerator | Enumerates the lines of a StringLineGroup. |
| StringLineGroup.Iterator | The iterator used to iterate other the lines. |
| StringLineGroup.LineOffset | The position of a line in the slice that StringLineGroup.ToSlice returns. |
Constructors
| Name | Description |
|---|---|
| StringLineGroup(int) | Initializes a new instance of the StringLineGroup class. |
| StringLineGroup(string) | Initializes a new instance of the StringLineGroup class. |
StringLineGroup overloads
StringLineGroup(int)
StringLineGroup.csInitializes a new instance of the StringLineGroup class.
public StringLineGroup(int capacity)Parameters
capacityint
StringLineGroup(string)
StringLineGroup.csInitializes a new instance of the StringLineGroup class.
public StringLineGroup(string text)Properties
| Name | Description |
|---|---|
| Count | Gets the number of lines. |
| Lines | Gets the lines. |
Count
StringLineGroup.csLines
StringLineGroup.csMethods
| Name | Description |
|---|---|
| Add(StringLine) | Adds the specified line to this instance. |
| Add(StringSlice) | Adds the specified slice to this instance. |
| Clear() | Clears this instance. |
| GetEnumerator() | Gets enumerator. |
| RemoveAt(int) | Removes the line at the specified index. |
| System.Collections.IEnumerable.GetEnumerator() | |
| ToCharIterator() | Converts this instance into a ICharIterator. |
| ToSlice(List<StringLineGroup.LineOffset>?) | Converts the lines to a single StringSlice by concatenating the lines. |
| ToString() | Performs the to string operation. |
| Trim() | Trims each lines of the specified StringLineGroup. |
Add overloads
Add(StringLine)
StringLineGroup.csAdds the specified line to this instance.
public void Add(ref StringLine line)Parameters
lineStringLine- The line.
Add(StringSlice)
StringLineGroup.csAdds the specified slice to this instance.
public void Add(StringSlice slice)Parameters
sliceStringSlice- The slice.
Clear()
StringLineGroup.csClears this instance.
public void Clear()GetEnumerator()
StringLineGroup.csRemoveAt(int)
StringLineGroup.csSystem.Collections.IEnumerable.GetEnumerator()
StringLineGroup.csToCharIterator()
StringLineGroup.csConverts this instance into a ICharIterator.
public readonly StringLineGroup.Iterator ToCharIterator()Returns
ToSlice(List<StringLineGroup.LineOffset>?)
StringLineGroup.csConverts the lines to a single StringSlice by concatenating the lines.
public readonly StringSlice ToSlice(List<StringLineGroup.LineOffset>? lineOffsets = null)Parameters
lineOffsetsList<StringLineGroup.LineOffset>?- The position of the `\n` line offsets from the beginning of the returned slice.
Returns
StringSlice A single slice concatenating the lines of this instance
ToString()
StringLineGroup.csTrim()
StringLineGroup.csTrims each lines of the specified StringLineGroup.
public void Trim()