HardCR Function | |
Replace all soft carriage returns (Chr(141)) in a string with hard carriage returns (Chr(13)).
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax FUNCTION HardCR(
cString AS STRING
) AS STRING
public static string HardCR(
string cString
)
Request Example
View SourceParameters
- cString
- Type: String
The string to convert.
Return Value
Type:
StringRemarks
Soft carriage returns are added by MemoEdit() when lines wrap. X# console commands, like REPORT and LABEL FORM, do not automatically convert soft carriage returns to hard carriage returns; therefore, in order to display long strings and memo fields containing soft carriage returns, you must convert them.
Examples
This examples uses HardCR() to display a memo field that has been formatted with the automatic word wrapping of MemoEdit():
1USE sales NEW
2? HARDCR(sales->Notes)
This example formats a string:
1? HARDCR(_Chr(141) + _Chr(10))
2
See Also