In the earlier lesson, we listed the Flowgorithm intrinsic functions. In this tutorial, we will concentrate on Flowgorithm String functions. We will learn the usage of the functions with some examples. A string is represented as an array of characters.
Flowgorithm String Functions
|Flowgorithm String Function||Description|
|Len(str)||The Len(str) function returns the length of the string. The length of the string is the number of characters in the given string.|
|Char(str, index)||The Char(str, index) function returns the character of the string at the index. This function is mainly used to extract the character at the specified index in the string. Characters in the string are indexed starting from 0.|
Find String Length
In this example, we will use the Len() function to find the length of the user entered string. The flowchart prompts the user to enter a string. The flowchart computes the length of the string and displays the output.
- Create string variable str
- Prompt the user to enter the string
- Store the user input in the string variable str
- Output the length of the string using the Len() function.
Flowgorithm tutorials on this website:
More Information on Flowgorithm tool: