Decode a Java primitive byte array Object or ‘byte array String’ into the human readable form. Useful when fetching values from AS400 systems.
Byte array String: ‘Byte array String’ will have a pattern ^^@>{Bytes}[byte[0], byte[1], ...]^^@>{Bytes} ‘Comments’. Trailing separator and comment part is optional, and they are only to improve human readability.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.String |
| Returns: | The human readable decoded String value for the given ‘byteArrayString’. |
Example:
=BYTE_STRING_DECODE("^^@>{Bytes}[-120, -123, -109, -109, -106]", "IBM037")
Output: "hello"
Note
AdapLink Data Exchange when receiving Java primitive byte array objects from systems like AS400, then the byte array is automatically converted to the corresponding byte array String and stored for further processing.
Encode a human readable String to ‘byte array String’. Useful when writing values to AS400 systems.
Byte array String: ‘Byte array String’ will have a pattern ^^@>{Bytes}[byte[0], byte[1], ...]^^@>{Bytes} ‘Comments’. Trailing separator and comment part is optional, and they are only to improve human readability.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.String |
| Returns: | The ‘encoded byte array String’ for the given value. |
Example:
=BYTE_STRING_ENCODE("hello", "IBM037", 0)
Output: "^^@>{Bytes}[-120, -123, -109, -109, -106]^^@>{Bytes} 'hello'"
=BYTE_STRING_ENCODE("hello", "IBM037", -1)
Output: "^^@>{Bytes}[-120, -123, -109, -109, -106]^^@>{Bytes} 'hello'"
=BYTE_STRING_ENCODE("hello", "IBM037", 6)
Output: "^^@>{Bytes}[-120, -123, -109, -109, -106, 64]^^@>{Bytes} 'hello '"
=BYTE_STRING_ENCODE("hello", "IBM037", 2)
Output: "^^@>{Bytes}[-120, -123]^^@>{Bytes} 'he'"
Note
AdapLink Data Exchange while writing data to AS400 for a column value starting with ^^@>{Bytes}, then the remaining integer values separated by comma is automatically converted to corresponding Java primitive byte array and send to AS400.
Removes all non-printable characters from the string (example: tab, newline).
| Arguments: |
|
|---|---|
| Return-type : | java.lang.String |
| Returns: | A string where all non-printable characters like tab, newline, etc. have been removed. |
Example:
=CLEAN("Adap\t\t\t\t\tChain")
Output: "AdapChain"
Removes all white spaces from a string.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.String |
| Returns: | A string where all white spaces have been removed. |
Example:
=COLLAPSE (" Where are you ")
Output: "Whereareyou"
Replaces multiple white spaces with a single white space.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.String |
| Returns: | A string where multiple white spaces has been replaced with a single white space. |
Example:
=COMPRESS (" Where are you ")
Output: " Where are you "
Concatenate two or more strings into one.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.String |
| Returns: | A concatenated string. |
Example:
=CONCAT ("This ", "is a ", "concatenated", " value")
Output: "This is a concatenated value"
Checks whether two strings are exactly identical or not.
Returns true or false.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.Boolean |
| Returns: | true if the string are exactly identical otherwise false. |
Example:
=EXACT ("AdapChain", "AdapChain")
Output: true
=EXACT ("AdapChain", "adapChain")
Output: false
Returns the starting position of one text string in another.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.Integer |
| Returns: | The starting position of one text string in another. |
Example:
=FIND("=", "AdapChain=Adaptive", 1)
Output: 10
=FIND("=", "AdapChain=Adaptive", 10)
Output: 10
=FIND("=","AdapChain=Adaptive", 11)
Output: 0
Changes the string to lowercase.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.String |
| Returns: | The string converted to lowercase. |
Example:
=LCASE("ARGUMENT")
Output: "argument"
Returns the no of specified characters from the left.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.String |
| Returns: | The number of specified characters from the left. |
Example:
=LEFT("AdapChain", "2")
Output: "Ad"
=LEFT("AdapChain", 4)
Output: "Adap"
=LEFT("AdapChain", 0)
Output: ""
Adds the specified character to the left.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.String |
| Returns: | A string with the padding to the left. |
Example:
=LPAD"102", "0", "10")
Output: "0000000102"
Removes all leading white spaces from a string.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.String |
| Returns: | The string ‘s’ after removing all leading white spaces. |
Example:
=LTRIM(" Where are you ")
Output: "Where are you "
Changes the first letter of the string to capital and all other characters to lower.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.String |
| Returns: | The string ‘s’ after converting the first letter of each word to uppercase and all other characters to lowercase. |
Example:
=PROPER("AdapChaiN solutions pvt Ltd")
Output: "Adapchain Solutions Pvt Ltd"
Repeat a text specified number of times
| Arguments: |
|
|---|---|
| Return-type : | java.lang.String |
| Returns: | The string ‘s’ repeated ‘i’ times. |
Example:
=REPEAT("101", "5")
Output: "101101101101101"
Replaces the no of characters from the given start index to no of characters with the given string.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.String |
| Returns: | The string after performing the replace. |
Example:
=REPLACE("Adapc", "5", "5", "Chain")
Output: "Adapchain"
=REPLACE("SupplyChaIIn", "9", "4", "ain")
Output: "SupplyChain"
Returns the number of specified characters from the right.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.String |
| Returns: | The number of specified characters from the right. |
Example:
=RIGHT("AdapChain", "0")
Output: ""
=RIGHT("AdapChain", 5)
Output: "Chain"
=RIGHT("AdapChain", "12")
Output: "AdapChain"
Adds the specified character to the left.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.String |
| Returns: | A string with the padding to the right. |
Example:
=RPAD("102", "0", "10")
Output: "1020000000"
Removes all trailing white spaces from a string.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.String |
| Returns: | A string after removing all trailing white spaces. |
Example:
=RTRIM(" Where are you ")
Output: " Where are you"
Returns the index within this string of the first occurrence of the specified substring.
If the string argument occurs as a searchString within fullString, then the index of the first character of the first such searchString is returned. If it does not occur as a searchString then -1 is returned.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.Integer |
| Returns: | The index of the first character of the first searchString found in fullString and -1 if it does not occur. |
Example:
=STR_INDEX_OF("AdapChain", "Adap")
Output: 0
=STR_INDEX_OF("AdapChain", "Chain")
Output: 4
Converts the arguments to string and checks if they are equal (case insensitive by default). Any object can be passed, it is converted to string before comparing using String.valueOf().
Returns true if they are equal otherwise false.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.Boolean |
| Returns: | true if they are equal otherwise false. |
Example:
=STREQ(RIGHT("AdapChain", 5), "CHAIN", "false")
Output: true - because RIGHT("AdapChain", 5) returns "Chain"
and case_sensitive has been set to false.
Converts the arguments to string and checks if the first argument is greater than the second argument (case insensitive by default). Any object can be passed, it is converted to string before comparing using String.valueOf().
Returns true if first string is greater than the second string.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.Boolean |
| Returns: | true if first string is greater than the second string. |
Example:
=STRGT("91", "101", "false")
Output: true - because 9 and 1 are compared first and 9 is lexicographically greater than 1.
Converts the arguments to string and checks if the first argument is greater than or equal to the second argument (case insensitive by default). Any object can be passed, it is converted to string before comparing using String.valueOf().
Returns true if first string is greater than or equal to the second string.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.Boolean |
| Returns: | true if first string is greater than or equal to the second string. |
Example:
=STRGTEQ("91", "101", "false")
Output: true - because 9 and 1 are compared first and 9 is lexicographically greater than 1.
Returns the number of characters in a string.
| Para java.lang.String s: | |
|---|---|
| Input string. Should not be null. | |
| Return-type : | java.lang.Integer |
| Returns: | The number of characters in a string. |
Example:
=STRLEN("AdapChain")
Output: 9
Converts the arguments to string and checks if the first argument is less than the second argument (case insensitive by default). Any object can be passed, it is converted to string before comparing using String.valueOf().
Returns true if first string is less than the second string.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.Boolean |
| Returns: | true if first string is less than the second string. |
Example:
=STRLT("101", "91", "false")
Output: true - because 1 and 9 are compared first and 1 is lexicographically lesser than 9.
Converts the arguments to string and checks if the first argument is less than or equal to the second argument (case insensitive by default). Any object can be passed, it is converted to string before comparing using String.valueOf().
Returns true if first string is less than or equal to the second string.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.Boolean |
| Returns: | true if first string is less than or equal to the second string. |
Example:
=STRLTEQ("101", "91", "false")
Output: true - because 1 and 9 are compared first and 1 is lexicographically lesser than 9.
Replaces the text with the given text at the specific instance. If instance integer is null every instances of the string is replaced.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.String |
| Returns: | A string after performing replacement. |
Example:
=SUBSTITUTE("1001", "0", "1", null)
Output: "1111"
=SUBSTITUTE("1001", "0", "1", "1")
Output: "1101"
Returns part of the input string.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.String |
| Returns: | Part of the input string. |
Example:
=SUBSTRING("AdapChain", "1", "4")
Output: "Adap"
=SUBSTRING("AdapChain", new Integer[1], "30")
Output: "AdapChain"
=SUBSTRING("AdapChain","1","5")
Output: "AdapC"
=SUBSTRING("AdapChain","2")
Output: "dapChain"
=SUBSTRING("AdapChain", new Integer[2], null)
Output: "dapChain"
Removes all leading and trailing white spaces from a string.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.String |
| Returns: | A string after removing all leading and trailing white spaces. |
Example:
=TRIM(" Where are you ")
Output: "Where are you"
Changes the string to uppercase.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.String |
| Returns: | The string converted to uppercase. |
Example:
=UCASE("argument")
Output: "ARGUMENT"
Converts a text string which is a number to a number.
| Arguments: |
|
|---|---|
| Return-type : | java.lang.Number |
| Returns: | Returns a number by converting the input a text string which is a number to a number. |
Example:
=VALUE("1.23")
Output: 1.23