Skip to content

string


=== Author: Assaf Ben Zur ===
This module covers all custom string operations used in MNS


Defenitions


camelCaseSplit

Split input string into array based on the 'camel-casing' rule.

Constructor: camelCaseSplit(ccString)
Return: list (splitted string)
Arguments:
  • ccString
Keyword Arguments:

combineStringList

Combine the given string array, into a single string, using the 'separatorS' string input as a seperator.

Constructor: combineStringList(stringList = [], separatorS = " ")
Return: string (combined string)
Arguments:
  • stringList(list) ; [default: []]
  • separatorS(str) ; [default: ""]
Keyword Arguments:

extractHeaderFromPythonFile

For the given python file, extract the header comment.

Constructor: extractHeaderFromPythonFile(filePath = None)
Return: list (file header)
Arguments:
  • filePath(str) ; [default: None]
Keyword Arguments:

flattenArray

Flatten a given list into a single string, seperated by commas

Constructor: flattenArray(array = [])
Return: string
Arguments:
  • array(list) ; [default: []]
Keyword Arguments:

flattenArrayColon

Flatten a given list into a single string, seperated by colons

Constructor: flattenArrayColon(array = [])
Return: string
Arguments:
  • array(list) ; [default: []]
Keyword Arguments:

flattenArrayKeepBracets

Flatten a given list into a single string, seperated by commas, adding the open and close square brackets as string.

Constructor: flattenArrayKeepBracets(array = [])
Return: string
Arguments:
  • array(list) ; [default: []]
Keyword Arguments:

flattenArrayKeepBracetsAndStrings

Flatten a given list into a single string, seperated by commas, adding the open and close square brackets as string as well as add the " into the actual string elements.

Constructor: flattenArrayKeepBracetsAndStrings(array = [])
Return: string
Arguments:
  • array(list) ; [default: []]
Keyword Arguments:

flattenArraySpace

Flatten a given list into a single string, seperated by spaces

Constructor: flattenArraySpace(array = [])
Return: string
Arguments:
  • array(list) ; [default: []]
Keyword Arguments:

splitStringToArray

Split the given string into a formatted array, using a "," split.

Constructor: splitStringToArray(stringSplit = "")
Return: list (splitted string)
Arguments:
  • stringSplit(str) ; [default: ""]
Keyword Arguments:

stringConvertToString

convert the input provided to a string, regardless of its type.

Constructor: stringConvertToString(var)
Return: None
Arguments:
  • var
Keyword Arguments:

stringMultiReplaceBySingle

Replace all given string characters by the 'replaceBy' string given.

Constructor: stringMultiReplaceBySingle(element = "", replaceStrings = [], replaceBy = "")
Return: string
Arguments:
  • element(str) ; [default: ""]
  • replaceStrings(list) ; [default: []]
  • replaceBy(str) ; [default: ""]
Keyword Arguments: