PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
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
PositionToLine (Function)
In french: PositionVersLigne
Returns the number of the line that contains a character identified by its position in a block of text.
Versions 18 and later
Stored procedures This function is now available in the code of stored procedures.
New in version 18
Stored procedures This function is now available in the code of stored procedures.
Stored procedures This function is now available in the code of stored procedures.
Example
// Initialize a multiline string
s is string = [
AA
BB
CC
]

PositionToLine(s, 1) // Returns 1
PositionToLine(s, 2) // Returns 1
PositionToLine(s, 3) // Returns 1 because of CR
PositionToLine(s, 5) // Returns 2
Syntax
<Result> = PositionToLine(<String> , <Position>)
<Result>: Integer
Number of the line that contains the specified character.
<String>: Character string (with quotes)
Character string to use.
<Position>: Integer
Position of the character.
Remarks
The line separator is the CR character (Carriage Return).
Component: wd260vm.dll
Minimum version required
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment