Admin Production ni-theme
Current Publication

StringLength

LabWindows/CVI

StringLength

int StringLength (char string[]);

Purpose

Returns the number of bytes in the string up to, but not including, the first ASCII NUL.

Example Code

char s[100];
int nbytes;
nbytes = StringLength (s);

Parameters

Input
Name Type Description
string char [] NUL–terminated string whose length is to be calculated.

Return Value

Name Type Description
length int Number of bytes in string up to, but not including, the ASCII NUL.

If the string is longer than can be represented by a signed integer, –1 is returned, indicating that an error occurred. You can use GetFmtIOError to get the specific error code.

Additional Information

Library: Formatting and I/O Library

Include file: formatio.h

LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later