Click or drag to resize

SLen Function

Return the length of a strongly typed string.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.5
Syntax
 FUNCTION SLen(
	cString AS STRING
) AS DWORD

Parameters

cString
Type: String
The string to count.

Return Value

Type: UInt32
The length of a string.
If the string is a NULL_STRING, SLen() returns 0.
Remarks
SLen() is a typed version of Len().  See Len() for a complete description.
Remarks
The compiler will replace calls to SLen() as much as possible with a direct call to the Length property of a string.
Examples
This example shows how to use strong typing to determine the length of a string:
X#
1LOCAL cName AS STRING
2cName := "William Shakespeare"
3? SLen(cName)                    // 19
See Also