Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > SDL script for generating code > Keywords > %getlength keyword (SDL script)
  
%getlength keyword (SDL script)
This keyword returns the length of a string.
You may want to use this keyword with the %getchar keyword to interrogate the characters in a string.
Syntax
%getlength "<string>"
In this example, Length is set to the number of characters in '13 characters', that is, 13.
%setvar "Length" = %getlength "13 characters"
In this example, nPos is set to the number of characters in the passed parameter strParamList.
%setlocalvar "nPos" = %getlength %getparam "strParamList"