PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Right and UNICODE
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Extracts the right part (which means the last characters) from a character string or from a buffer.
Example
// Extract characters
Right("The cuckoo", 6)   // Returns "cuckoo"
Right("ABC", 50)   // Returns "ABC"
Right(" AZELMA")   // Returns "AZELMA"

MyString is string = "Antananarivo - Madagascar"
Right(MyString, 10) // Returns "Madagascar"
Reports and Queries
// Extract the bytes
MyBuffer is Buffer = "Antananarivo - Madagascar"
Right(MyBuffer, 10)  // Returns "Madagascar"
Syntax

Extracting the right part from a character string Hide the details

<Result> = Right(<Source string> [, <Length>])
<Result>: Character string
  • Right part of <Source string>. Corresponds to <Source string> if <Length> is greater than the length of <Source string>.
  • EOT if <Length> is negative. A WLanguage error occurs (non-fatal error). To get the details of the error, use ErrorInfo.
<Source string>: Character string (with quotes)
Character string whose right part must be extracted. This string is not modified.
<Length>: Optional integer
Number of characters to extract. If this parameter is not specified, <Result> corresponds to <Source string> without the space characters on the left.
Reports and Queries

Extracting the right part from a buffer Hide the details

<Result> = Right(<Source buffer> [, <Size>])
<Result>: Buffer
  • Right part of <Source buffer>. Corresponds to <Source buffer> if <Size> is greater than the size of <Source buffer>.
  • EOT if <Size> is negative. A WLanguage error occurs (non-fatal error). To get the details of the error, use ErrorInfo.
  • Invalid buffer if <Source buffer> contains a character string in UNICODE format.
<Source buffer>: Buffer
Name of buffer whose right part will be extracted. This buffer is not modified.
<Size>: Optional integer
Number of bytes to extract. If this parameter is not specified, <Result> corresponds to <Source buffer> without the space characters on the left.
Remarks

Right and UNICODE

If the string passed as a parameter is in ANSI format, the result will be in ANSI format.
If the string passed as a parameter is in UNICODE format, the result will be in UNICODE format.
Reminder: In UNICODE, each character occupies two memory bytes. Therefore, the memory footprint of a UNICODE string is twice the number of characters actually found in the string.
In UNICODE, the subscript of the first character in the string is set to 1.
Remark: If the result on an ANSI string is assigned to a UNICODE string (and conversely), the conversion will be implicitly performed.
See Managing the UNICODE format for more details.
Component : wd250vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment