# substr

This function returns a substring from a value that is of type bitstring, hexstring, octetstring, or any character string. The type of the substring is the root type of the input value. The starting point of substring to return is defined by the second in parameter (index). Indexing starts from zero. The third input parameter defines the length of the substring to be returned.

Related keyword:

- integer
- charstring
- hexstring
- bitstring
- octetstring

### substr(any_string_type value, in integer index, in integer returncount) return input_string_type

Example 1:

var charstring v_nyilatko := substr( "My name is JJ", 11, 2 );

The variable v_nyilatko will contain the charstring value "JJ".