strLib.setNullTerminator

The system function strLib.setNullTerminator changes all trailing spaces in a string to nulls. You can use strLib.setNullTerminator to convert an item before passing it to a C or C++ program that expects a null-terminated string as an argument.


strLib.setNullTerminator syntax diagram

target

String to be converted

The target string is searched for trailing spaces and nulls. Any spaces found are changed to nulls.

Definition considerations

The following value can be returned in sysVar.errorCode:

16

Last byte of string is not a space or null

Example

  strLib.setNullTerminator(myItem01);

Related reference
String handling (system words)