IsSubstringOf
Name | IsSubstringOf |
Syntax | IsSubstringOf (String str1, String str2) |
Purpose | To search specified string for another specified string value and return True if the latter is a substring of str2. |
Description | Checks whether specified string is a substring of another string value. Note: Is case sensitive. |
Return Type | Boolean |
Parameters | str1 [System.String] – String to search for str2 [System.String] – String to search in |
![](https://documentation.astera.com/~gitbook/image?url=https%3A%2F%2Fgithub.com%2Fastera-software%2FAstera_Data_Stack_v9%2Fblob%2Fmain%2F.gitbook%2Fassets%2F0%2520%28171%29.png&width=768&dpr=4&quality=100&sign=77e13459&sv=1)
Example
In this example, we are passing the required parameters to the function transformation object using a Variables object.
Where,
str1 = llo
str2 = Hello World
![](https://documentation.astera.com/~gitbook/image?url=https%3A%2F%2Fgithub.com%2Fastera-software%2FAstera_Data_Stack_v9%2Fblob%2Fmain%2F.gitbook%2Fassets%2F1%2520%28171%29.png&width=768&dpr=4&quality=100&sign=a4c1b4fc&sv=1)
Right-click on the function transformation object and select Preview Output. You can see that Astera Data Stack has returned “True”, as the str1 value is a substring of the specified str2 value.
![](https://documentation.astera.com/~gitbook/image?url=https%3A%2F%2Fgithub.com%2Fastera-software%2FAstera_Data_Stack_v9%2Fblob%2Fmain%2F.gitbook%2Fassets%2F2%2520%28172%29.png&width=768&dpr=4&quality=100&sign=a3130076&sv=1)