Class Strings
String collection
Implements
Inherited Members
Namespace: Reportman.Drawing
Assembly: Reportman.Drawing.dll
Syntax
public class Strings : List<string>, IList<string>, ICollection<string>, IList, ICollection, IReadOnlyList<string>, IReadOnlyCollection<string>, IEnumerable<string>, IEnumerable, ICloneable
Constructors
Strings()
Declaration
public Strings()
Properties
Text
Get a single string separating strings by a LINE FEED char, (char)10
Declaration
public string Text { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Clone()
Clone the object
Declaration
public object Clone()
Returns
| Type | Description |
|---|---|
| object | A object clone |
FromSemiColon(string)
Converts a string with semicolons to a Strings collection
Declaration
public static Strings FromSemiColon(string semicolonstring)
Parameters
| Type | Name | Description |
|---|---|---|
| string | semicolonstring |
Returns
| Type | Description |
|---|---|
| Strings |
FromSeparator(char, string)
Converts a string with any separator to a Strings collection
Declaration
public static Strings FromSeparator(char separator, string nstring)
Parameters
| Type | Name | Description |
|---|---|---|
| char | separator | |
| string | nstring |
Returns
| Type | Description |
|---|---|
| Strings |
GetStringByIndex(string, int)
Obtain a single string from a collection of strings stored in a single string
Declaration
public static string GetStringByIndex(string astring, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| string | astring | A list of strings represented by a single string separated by LF (char)10 |
| int | index | Index to check |
Returns
| Type | Description |
|---|---|
| string | Returns a single string, obtained from index or an empty string if not found |
LoadFromFile(string)
Declaration
public void LoadFromFile(string filename)
Parameters
| Type | Name | Description |
|---|---|---|
| string | filename |
LoadFromStream(Stream)
Declaration
public void LoadFromStream(Stream nstream)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | nstream |
RemoveBlanks()
Remove the empty strings
Declaration
public void RemoveBlanks()
SetStringByIndex(string, string, int)
Generates a string collection (inside a single string) from a collection of strings an index and a string. So really, it inserts (or update) a line inside a group of lines.
Declaration
public static string SetStringByIndex(string astring, string avalue, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| string | astring | A list of strings represented by a single string separated by LF (char)10 |
| string | avalue | String value to insert into the list |
| int | index |
Returns
| Type | Description |
|---|---|
| string | Collection of strings separated by LF with the line inserted or updated |
ToCharSeparated(char)
Converts the string collection into a semicolon separated string
Declaration
public string ToCharSeparated(char separator)
Parameters
| Type | Name | Description |
|---|---|---|
| char | separator |
Returns
| Type | Description |
|---|---|
| string |
ToSemiColon()
Converts the string collection into a semicolon separated string
Declaration
public string ToSemiColon()
Returns
| Type | Description |
|---|---|
| string |