ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / String functions
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
PositionToLine (Function)
In french: PositionVersLigne
Returns the number of the line that contains a character identified by its position in a block of text.
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
Character string to use.
<Position>: Integer
Position of the character.
Remarks
The line separator is the CR character (Carriage Return).
Component: wd290vm.dll
Minimum version required
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help