OpenKeyWord
Build Tag: jenkins-DoxyGen_EN-107, Build ID: 2015-03-08_20-51-06
|
Class contains OKW-Helpfunctions. More...
Static Public Member Functions | |
static string | Boolean2String (bool fpbTrueOrFalse) |
Converts bool true /false to string "true"/"false". More... | |
static string | GetLeftFromDelimiterNumber (string fpsSource, string fpsDelimiter, int fpiCount) |
The String will be cut at the fpiCount-ten delimiter and the left half of the String is returned. More... | |
static string | GetRigthFromDelimiterNumber (string fpsSource, string fpsDelimiter, int fpiCount) |
Cuts fpsSource at fpiCount-ten fpsDelimiter and returns the right part of the string. More... | |
static bool | ListStringCompare (List< string > ListString1, List< string > ListString2) |
Compares two ListStrings with view to their content. More... | |
static string | ListStringConcat (List< string > fps_ListString2Concat, string fps_Separator) |
static bool | MatchStr (string fpsPattern, string fpsStringToMatch) |
Source: http://stackoverflow.com/questions/6907720/need-to-perform-wildcard-etc-search-on-a-string-using-regex. More... | |
static bool | MatchStrIgnoreCase (string fpsPattern, string fpsStringToMatch) |
Source: http://stackoverflow.com/questions/6907720/need-to-perform-wildcard-etc-search-on-a-string-using-regex. More... | |
static string | RemoveBeginEndQuotations (string fps_StringinQuotations) |
Removes quotation marks " at the beginning and at the end. Quotation marks being internal of the string will not be removed. If there are no quotation marks at the beginning and at the end, then the return is identical to the input. More... | |
static List< string > | StrArray2ListStr (string[] fpsStringArray) |
Converts a String-Array to a List-String. More... | |
static bool | String2Boolean (string fpsTrueOrFalse) |
Converts string "true"/"false" to bool. More... | |
static List< string > | StrSplit (string fpsString2Split, string fpsSeparator) |
Splits a string at the given Separator. The separator can consist of more than one sign. More... | |
Static Private Attributes | |
static Logger | Log = Logger.Instance |
static LogMessenger | LM = new LogMessenger("OKWHelper") |
Class contains OKW-Helpfunctions.
This class is and should to be used in project specific classes.
|
static |
Converts bool true
/false
to string "true"/"false".
fpbTrueOrFalse | Boolean value to be converted. |
true
is to be changed in "true" andfalse
becomes "false".
|
static |
The String will be cut at the fpiCount-ten delimiter and the left half of the String is returned.
An exception is triggered, if
Valid examples:
"AAAA" = OKWHelper.GetLeftFromDelimiterNumber("AAAACBBBB", "C", 1)
"AAAACBBBB" = OKWHelper.GetLeftFromDelimiterNumber("AAAACBBBBCDDDD", "C", 2)
"AAAAGGBBBB"= OKWHelper.GetLeftFromDelimiterNumber("AAAAGGBBBBGGDDDD", "GG", 2)
Examples with triggering the exception procedure
OKWHelper.GetLeftFromDelimiterNumber("AAAACBBBB", "", 1) : OKW.OKWDelimiterIsEmptyException
OKWHelper.GetLeftFromDelimiterNumber("AAAACBBBBCDDDD", "C", 3) : OKW.OKWDelimiterCountOutOfRangeException
OKWHelper.GetLeftFromDelimiterNumber("AAAAGGBBBBGGDDDD", "GG", 0) : OKW.OKWDelimiterCountOutOfRangeException
fpsSource | Signstring to be cut. |
fpsDelimiter | Delimiter which is cut. Delimiter itself is no part of the return. Delimiter can exist out of more than 1 sign. |
fpiCount | Number of delimiter to be cut. fpiCount is out of the multitude of natural numbers, 1, 2, 3, ... sides of the string, viewed from delimiter fpsDelemeter. |
|
static |
Cuts fpsSource at fpiCount-ten fpsDelimiter and returns the right part of the string.
Valid examples:
"DDD/EEE" = GetRigthFromDelimiterNumber("AAA/BBB/CCC/DDD/EEE", "/", 3)
"BBB/CCC/DDD/EEE" = GetRigthFromDelimiterNumber("AAA/BBB/CCC/DDD/EEE", "/", 1)
"EEE" = GetRigthFromDelimiterNumber("AAA/BBB/CCC/DDD/EEE", "/", 4)
Examples triggering the exception procedure
OKWHelper.GetRigthFromDelimiterNumber("AAAACBBBB", "", 1) : System.IndexOutOfRangeException
OKWHelper.GetRigthFromDelimiterNumber("AAAACBBBBCDDDD", "C", 3) : System.IndexOutOfRangeException
OKWHelper.GetRigthFromDelimiterNumber("AAAAGGBBBBGGDDDD", "GG", 0) : System.IndexOutOfRangeException
fpsSource | Quelle |
fpsDelimiter | Delimiter which is to be cut. |
fpiCount |
TODO ZH: Rückgabewert beschreiben.
|
static |
Compares two ListStrings with view to their content.
ListString1 | String Nr. 1 |
ListString2 | String Nr. 2 if the string content is identical, else false. |
|
static |
|
static |
fpsPattern | |
fpsStringToMatch |
|
static |
fpsPattern | |
fpsStringToMatch |
|
static |
Removes quotation marks " at the beginning and at the end. Quotation marks being internal of the string will not be removed. If there are no quotation marks at the beginning and at the end, then the return is identical to the input.
fps_StringinQuotations | String, which should be removed from quotation marks. without quotation marks at the beginning an the end. |
|
static |
|
static |
Converts string "true"/"false" to bool.
true
/false
.
The | exception OKWNotAllowedValueException is triggerd, if the input Parapere is not "true"/"false". |
fpbTrueOrFalse | Boolean value to be converted. |
true
is to be changed in "true" andfalse
becomes "false".
|
static |
Splits a string at the given Separator. The separator can consist of more than one sign.
fpsString2Split | string to be splitted. |
fpsSeparator |
|
staticprivate |