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.2a
Syntax
 FUNCTION SLen(
	cString AS STRING
) AS DWORD
View Source

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#
LOCAL cName AS STRING
cName := "William Shakespeare"
? SLen(cName)                                        // 19
See Also