_STRLEN_SPP()--Determine Character String Length for i5/OS PASE


  Syntax
 #include <as400_protos.h>

 size_t _STRLEN_SPP(const ILEpointer  *string);

  Default Public Authority: *USE

  Library: Standard C Library (libc.a)

  Threadsafe: Yes

Note: This function can only be used in an i5/OS PASE program. See i5/OS PASE for more information about creating i5/OS PASE programs.

The _STRLEN_SPP() determines the length of a null-terminated character string. It performs the same operation as the strlen function, but uses a 16-byte tagged space pointer to locate the string.


Parameters

string
(Input) Pointer to character string. string is the 16-byte aligned address of a tagged space pointer to the character string.

Authorities

_STRLEN_SPP requires no authority.


Return Value

_STRLEN_SPP returns length of the character string.


Error Conditions

Any error is reported with an i5/OS exception message that the system converts to an i5/OS PASE signal. See i5/OS PASE Signal Handling for information about handling i5/OS exceptions.


Usage Notes

  1. _STRLEN_SPP can reference any memory addressable through a tagged space pointer, which need not be in the i5/OS PASE address space.

  2. _STRLEN_SPP is implemented with a kernel system call, so it generally runs slower than strlen.

Related Information



API introduced: V4R5
Top | i5/OS PASE APIs | APIs by category