MLine Function (String, DWord) | |
Extract a line of text from a string, specifying an optional offset argument.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax FUNCTION MLine(
cString AS STRING,
nLine AS DWORD
) AS STRING
public static string MLine(
string cString,
uint nLine
)
Request Example
View SourceParameters
- cString
- Type: String
The string that contains the line of text. - nLine
- Type: DWord
The line number to extract.
Return Value
Type:
String
The specified line.
If the specified line does not exist, the return value is a NULL_STRING.
A new line begins when a hard-carriage return is encountered.
Remarks Examples
This example uses MLine(), to extract the first line that is past offset 10 (the 11th character).
1? MLine(Customer->Memos, 1, 10)
This example applies MLine() to a string that has two lines:
1? MLine(Space(30)+Chr(13)+Space(40), 1)
2
This example passes
nOffset by reference:
1nOffset := 0
2? MLine(Space(30)+Chr(13)+Space(40), 1, @nOffset)
3
4? nOffset
See Also