IGLib
1.7.2
The IGLib base library for development of numerical, technical and business applications.
|
Static Public Member Functions | |
static int | SkipSeparator (string str, int startpos, char separator) |
static int | SkipSpaces (string str, int startpos) |
Returns index of the first non-whitespace character in str from the specified position pos (counted from 0). More... | |
static int | ReadInteger (ref int number, string str, int startpos) |
Reads an integer from a string, starting at a specified position and skipping eventual leading spaces. Returns the position of the first character after the read integer (or -1 if reading failed) and outputs the read number. More... | |
static int | ReadInteger (ref int number, string str, int startpos, bool skipspaces) |
Reads an integer from a string, starting at a specified position and skipping eventual leading spaces. Returns the position of the first character after the read integer (or -1 if reading failed) and outputs the read number. More... | |
static int | ReadInteger (ref long number, string str, int startpos, bool skipspaces) |
Reads an integer from a string, starting at a specified position. Returns the position of the first character after the read number (or -1 if reading failed) and outputs the read number. More... | |
static int | ReadNumber (ref double number, string str, int startpos) |
Reads a number from a string, starting at a specified position and skipping eventual leading spaces. Returns the position of the first character after the read number (or -1 if reading failed) and outputs the read number. More... | |
static int | ReadNumber (ref double number, string str, int startpos, bool skipspaces) |
Reads a number from a string, starting at a specified position. Returns the position of the first character after the read number (or -1 if reading failed) and outputs the read number. More... | |
static int | SkipInteger (string str, int beginpos, bool skipspaces, bool failiffloatingpoint) |
Returns index of the first character in str after the representation of an integer number. More... | |
static int | SkipInteger (string str, int beginpos, bool skipspaces) |
Returns index of the first character in str after the representation of an integer number. Leading whitespace characters are ignored, i.e. number is looked for after all space characters. More... | |
static int | SkipInteger (string str, int beginpos) |
Returns index of the first character in str after the representation of an integer number. Leading whitespace characters are ignored, i.e. number is looked for after all space characters. More... | |
static int | SkipNumber (string str, int beginpos, bool skipspaces) |
Returns index of the first character in str after the representation of a number (either floating point or integer). More... | |
static int | SkipNumber (string str, int beginpos) |
Returns index of the first character in str after the representation of a number (either floating point or integer). More... | |
static int | SkipToCharacter (string str, int beginpos, char target) |
static int | ReadDoubleList (ref List< double > tab, string str, int startpos, char open, char close, char separator, bool skipspaces) |
Reads a list of numbers of type double from result stirng startng at specified position, and returns position after the list. Numbers must be separated by a specified separator (with spaces allowed between them) and embedded within specified brackets. More... | |
static int | ReadDoubleList (ref List< List< double >> tab, string str, int startpos, char open, char close, char separator, bool skipspaces) |
Reads a list of lists of numbers of type double from result stirng startng at specified position, and returns position after the list. Numbers and sub-lists must be separated by a specified separator (with spaces allowed between them) and embedded within specified brackets. More... | |
static string | ListToString (List< double > l) |
static string | ListToString (List< List< double >> l) |
static void | Examples () |
Private Member Functions | |
int | SkipToBracketLevel (string str, int beginpos, char open, char close, int targetlevel) |
Returns position of the first character that has the specified nesting messagelevel with respect to open and close brackets and the current messagelevel. Nesting messagelevel begins with 0 and is increased with every open bracked and decreased with any closed bracket. More... | |
Static Private Member Functions | |
static int | ReadInteger (ref long number, string str, int startpos) |
Reads an integer from a string, starting at a specified position and skipping eventual leading spaces. Returns the position of the first character after the read integer (or -1 if reading failed) and outputs the read number. More... | |
Static Private Attributes | |
static int | RetFailed = -1 |
|
inlinestatic |
|
inlinestatic |
Returns index of the first non-whitespace character in str from the specified position pos (counted from 0).
str | String that is parsed. |
startpos | Position where search begins (counted from 0). |
Referenced by IG.Num.Scalar.Parse(), IG.Num.Counter.Parse(), IG.Num.Scalar.TryParse(), and IG.Num.Counter.TryParse().
|
inlinestatic |
Reads an integer from a string, starting at a specified position and skipping eventual leading spaces. Returns the position of the first character after the read integer (or -1 if reading failed) and outputs the read number.
number | Output parameter returning the number that was read. |
str | String from which the number is read. |
startpos | Starting position from which the number is searched for. |
Referenced by IG.Num.Counter.Read().
|
inlinestatic |
Reads an integer from a string, starting at a specified position and skipping eventual leading spaces. Returns the position of the first character after the read integer (or -1 if reading failed) and outputs the read number.
number | Output parameter returning the number that was read. |
str | String from which the number is read. |
startpos | Starting position from which the number is searched for. |
skipspaces | Wheather spaces should be skipped. |
|
inlinestaticprivate |
Reads an integer from a string, starting at a specified position and skipping eventual leading spaces. Returns the position of the first character after the read integer (or -1 if reading failed) and outputs the read number.
number | Output parameter returning the number that was read. |
str | String from which the number is read. |
startpos | Starting position from which the number is searched for. |
|
inlinestatic |
Reads an integer from a string, starting at a specified position. Returns the position of the first character after the read number (or -1 if reading failed) and outputs the read number.
number | Output parameter returning the number that was read. |
str | String from which the number is read. |
startpos | Starting position from which number is searched for. |
skipspaces | If true then leading spaces are ignored, otherwise operation fails if there is a whitespace at the starting position. |
|
inlinestatic |
Reads a number from a string, starting at a specified position and skipping eventual leading spaces. Returns the position of the first character after the read number (or -1 if reading failed) and outputs the read number.
number | Output parameter returning the number that was read. |
str | String from which the number is read. |
startpos | Starting position from which the number is searched for. |
Referenced by IG.Num.Scalar.Read().
|
inlinestatic |
Reads a number from a string, starting at a specified position. Returns the position of the first character after the read number (or -1 if reading failed) and outputs the read number.
number | Output parameter returning the number that was read. |
str | String from which the number is read. |
startpos | Starting position from which number is searched for. |
skipspaces | If true then leading spaces are ignored, otherwise operation fails if there is a whitespace at the starting position. |
|
inlinestatic |
Returns index of the first character in str after the representation of an integer number.
str | String that is parsed. |
beginpos | Position where search begins (counted from 0). |
skipspaces | Indicates whether to skip the eventual leading whitespaces. |
failiffloatingpoint | If true then method fails if there is a floating point number representation. If false then the position of the decimal point is returned. |
|
inlinestatic |
Returns index of the first character in str after the representation of an integer number. Leading whitespace characters are ignored, i.e. number is looked for after all space characters.
str | String that is parsed. |
beginpos | Position where search begins (counted from 0). |
skipspaces | Indicates whether to skip leading spaces. |
|
inlinestatic |
Returns index of the first character in str after the representation of an integer number. Leading whitespace characters are ignored, i.e. number is looked for after all space characters.
str | String that is parsed. |
beginpos | Position where search begins. |
|
inlinestatic |
Returns index of the first character in str after the representation of a number (either floating point or integer).
str | String that is parsed. |
beginpos | Position where search begins (counted from 0). |
skipspaces | Indicates whether to skip the eventual leading whitespaces. |
|
inlinestatic |
Returns index of the first character in str after the representation of a number (either floating point or integer).
str | String that is parsed. |
beginpos | Position where search begins (counted from 0). |
|
inlinestatic |
|
inlinestatic |
Reads a list of numbers of type double from result stirng startng at specified position, and returns position after the list. Numbers must be separated by a specified separator (with spaces allowed between them) and embedded within specified brackets.
tab | Output parameter where read-in list is written. |
str | String from which the list is read. |
startpos | Starting positio nwhere reading begins. |
open | Opening bracket of the list. |
close | Closing bracket of the list. |
separator | Separator that separates the numbers. |
skipspaces | If true then leading spaces are skipped first, otherwise starting position must be exactly at the opening bracket of the list. |
|
inlinestatic |
Reads a list of lists of numbers of type double from result stirng startng at specified position, and returns position after the list. Numbers and sub-lists must be separated by a specified separator (with spaces allowed between them) and embedded within specified brackets.
tab | Output parameter where read-in list is written. |
str | String from which the list is read. |
startpos | Starting positio nwhere reading begins. |
open | Opening bracket of the list and sub-lists. |
close | Closing bracket of the list and sub-lists. |
separator | Separator that separates the numbers and sub-lists. |
skipspaces | If true then leading spaces are skipped first, otherwise starting position must be exactly at the opening bracket of the list. |
|
inlineprivate |
Returns position of the first character that has the specified nesting messagelevel with respect to open and close brackets and the current messagelevel. Nesting messagelevel begins with 0 and is increased with every open bracked and decreased with any closed bracket.
str | String that is parsed. |
beginpos | Position where search begins (counted from 0). |
open | The opening bracket. |
close | The closing bracket. |
targetlevel | Level that must be reached. Can be either a positive or negative integer. If messagelevel is 0 then initial position is returned. |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
staticprivate |