Difference between revisions of "LENC()"

From Lianjapedia
Jump to: navigation, search
(Created page with "==Purpose== Function to return length of specified double byte character expression ==Syntax== LENC(<expC>[,<expL>]) ==See Also== AT(), AT_C(), CHRTRAN(), CHRT...")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
Function to return length of specified double byte character expression
+
Function to return length of specified character expression (double byte character sets)
  
 
==Syntax==
 
==Syntax==
Line 9: Line 9:
  
 
==Description==
 
==Description==
The LENC() function returns the length of specified double byte character expression <expC>.  This function should be used when working with Unicode/UTF-8 characters. LEN() and STRLEN() are used with single byte character sets.  The optional <expL> is ignored.
+
The LENC() function returns the length of specified double byte character expression <expC>.  This function should be used when working with Unicode/UTF-8 characters. [[LEN()]] and [[STRLEN()]] are used with single byte character sets.  The optional <expL> is ignored.
  
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
// cOneDBC contains a single double byte Korean character
+
nLength = lenc(cDBString)
? lenc(cOneDBC)
+
        1
+
? len(cOneDBC)
+
        3
+
 
</code>
 
</code>
 
  
 
[[Category:Documentation]]
 
[[Category:Documentation]]

Latest revision as of 07:45, 15 September 2014

Purpose

Function to return length of specified character expression (double byte character sets)

Syntax

LENC(<expC>[,<expL>])

See Also

AT(), AT_C(), CHRTRAN(), CHRTRANC(), LEFT(), LEFTC(), LEN(), RAT_C(), RAT(), RIGHT(), RIGHTC(), SET STRESCAPE, STREXTRACT(), STRLEN(), STRTRAN(), STUFF(), STUFFC(), SUBSTR(), SUBSTRC()

Description

The LENC() function returns the length of specified double byte character expression <expC>. This function should be used when working with Unicode/UTF-8 characters. LEN() and STRLEN() are used with single byte character sets. The optional <expL> is ignored.

Example

nLength = lenc(cDBString)