Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

This function is one of Plugins Operation.You can find the movie in ARGOS RPA+ video tutorial.





Basic String Manipulation


Author: Kyobong An


Description

This plugin covers a broad range of handlings of character strings. It is comprehensive, powerful, and most of all useful. However, it requires certain knowledge about Python programming. It is designed more for programmers as it is based on the standard types string method of Python.


https://docs.python.org/3/library/stdtypes.html#string-methods


Need help?

Technical contact to tech@argos-labs.com


May you search all operations,




Required Input

  • String

    • String to handle : The string to use for basic string manipulation.

    • String from file : text file path.


  • String operation type

    • True/False

      • isalnum : Return True if all characters in the string are alphanumeric and there is at least one character, False otherwise.

      • isalpha : Return True if all characters in the string are alphabetic and there is at least one character, False otherwise.

      • isascii : Return True if the string is empty or all characters in the string are ASCII, False otherwise.

      • isdecimal : Return True if all characters in the string are decimal characters and there is at least one character, False otherwise.

      • isdigit : Return True if all characters in the string are digits and there is at least one character, False otherwise.

      • islower : Return True if all cased characters  in the string are lowercase and there is at least one cased character, False otherwise.

      • isnumeric : Return True if all characters in the string are numeric characters, and there is at least one character, False otherwise.

      • isspace : Return True if there are only whitespace characters in the string and there is at least one character, False otherwise.

      • istitle : Return True if the string is a titlecased string and there is at least one character, for example uppercase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.

      • isupper : Return True if all cased characters  in the string are uppercase and there is at least one cased character, False otherwise.

    • Convert

      • capitalize : Return a copy of the string with its first character capitalized and the rest lowercased.

      • lower : Return a copy of the string with all the cased characters converted to lowercase.

      • replace : Return a copy of the string with all occurrences of substring string1 replaced by string2.

      • swapcase : Return a copy of the string with uppercase characters converted to lowercase and vice versa.

      • title : Return a titlecased version of the string where words start with an uppercase character and the remaining characters are lowercase.

      • upper : Return a copy of the string with all the cased characters converted to uppercase.

    • Fill

      • center : Return centered in a string of length width(int1). Padding is done using the specified character.

      • ljust : Return the string left justified in a string of length width(int1). Padding is done using the specified character.

      • rjust : Return the string right justified in a string of length width(int1). Padding is done using the specified character.

      • Zfill : Return a copy of the string left filled with ASCII '0' digits to make a string of length width(int1).

    • Find

      • count : Return the number of non-overlapping occurrences of string1

      • find : Return the number of non-overlapping occurrences of string1

      • Index : Like find(), but raise ValueError when the string1 is not found.

      • rfind : Return the highest index in the string where string1 is found, such that string1 is contained within int1 to int2.

      • rindex : Like rfind() but raises ValueError when the string1 is not found.

    • Join

      • join : Return "String to handle" which is the concatenation of the strings in list.

    • Split

      • expandtabs : Return a copy of the string where all tab characters are replaced by one or more spaces, depending on the current column and the given tab size.

      • partition : Split the string at the first occurrence of string1, and return a 3-tuple containing the part before the separator, the separator itself, and the part after the separator

      • rpartition : Split the string at the last occurrence of string1, and return a 3-tuple containing the part before the separator, the separator itself, and the part after the separator.

      • rsplit : Return a list of the words in the string, using string1 as the delimiter string.

      • split : Return a list of the words in the string, using string1 as the delimiter string. If maxsplit(int1) is given, at most maxsplit(int1) splits are done.

      • splitlines : Return a list of the lines in the string, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends(True & False)is given and true.

    • Strip

      • lstrip : Remove whitespace from left side of string

      • rstrip : Remove whitespace from right side of string

      • strip : Remove spaces from both sides of a string

    • Swith

      • endswith : Return True if the string ends with the specified suffix(string1), otherwise return False. suffix can also be a list of suffixes to look for.

      • Startswith : Return True if string starts with the prefix(string1), otherwise return False. prefix can also be a tuple of prefixes to look for. With optional start(int1), test string beginning at that position. With optional end(int2), stop comparing string at that position.


 

Optional Input

  • int 1 : The first integer type argument.
  • int 2 : The second integer type argument.
  • string 1 : The first string type argument.
  • string 2 : The second string type argument.
  • character : Arguments of type characters.
  • list : A list-type argument.
  • sub True/False : Boolean type argument.

 

Return Value

  • Result string of the manipulation

 

Return Code

  • 0     Execution Successful
  • 1          Return value is False
  • 99   All other responses from the plugin

 

Parameter Setting Examples by function

  • True/False

  • Convert

  • Fill

  • Find

  • Join

  • Split

  • Strip

  • Swith




Update 2022/03/07


  • Indexing and slicing

This new feature is almost identical to Python standard slicing and indexing functions. For more information, please let the links below lead to you the respective Python pages.


Indexing of character strings

When character string looks like                a b c d e f g h I

the indexing will look like                           1 2 3 4 5 6 7 8 9

Indexing starts with 1

 3 ways to set the parameter using example above

  1. 5              this will return “e”
  2. 5:            this will return “efgh”
  3. 5:7          this will return “efg”
  • No labels