ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE


Asc
Val
This content has been translated automatically.  Click here  to view the French version.
  • Right and UNICODE
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Extracts the right part (i.e., the last characters) from a string or buffer.
Example
// Extraction de caractères
Right("Le coucou", 6)   // Renvoie "coucou"
Right("ABC", 50)   // Renvoie "ABC"
Right(" AZELMA")   // Renvoie "AZELMA"
 
MaChaîne is string = "Antananarivo - Madagascar"
Right(MaChaîne, 10) // Renvoie "Madagascar"
Universal Windows 10 AppAndroidAndroid Widget
// Extraction d'octets
MonBuffer is Buffer = "Antananarivo - Madagascar"
Right(MonBuffer, 10)  // Renvoie "Madagascar"
Syntax

Extracting the right part of a character string Hide the details

<Result> = Right(<Initial string> [, <Length>])
<Result>: Character string
  • Right part of <Initial string>. Corresponds to <Initial string> if <Length> is greater than the length of <Initial string>.
  • EOT if <Length> is negative. A WLanguage error occurs (non-fatal error). To get more details on the error, use ErrorInfo.
<Initial string>: Character string
Character string from which the right part will be extracted. This string is not modified.
<Length>: Optional integer
Number of characters to extract. If this parameter is not specified, <Result> corresponds to <Initial string> without leading spaces.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst

Extracting the right part of a buffer Hide the details

<Result> = Right(<Initial buffer> [, <Size>])
<Result>: Buffer
  • Right part of <Initial buffer>. Corresponds to <Initial buffer> if <Size> is greater than the size of <Initial buffer>.
  • EOT if the parameter is negative. A WLanguage error occurs (non-fatal error). To get more details on the error, use ErrorInfo.
  • Invalid buffer if <Initial buffer> contains a UNICODE string.
<Initial buffer>: Buffer
Name of the buffer from which the 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 <Initial buffer> without leading spaces.
Remarks

Right and UNICODE

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