From ff39701b0e841035089929ab7811c7431ab9b39b Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Thu, 15 Nov 2012 11:10:24 +0100 Subject: format Basic code examples --- source/text/sbasic/shared/03120305.xhp | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'source/text/sbasic/shared/03120305.xhp') diff --git a/source/text/sbasic/shared/03120305.xhp b/source/text/sbasic/shared/03120305.xhp index 90b9e7e36c..41e3f37979 100644 --- a/source/text/sbasic/shared/03120305.xhp +++ b/source/text/sbasic/shared/03120305.xhp @@ -47,7 +47,9 @@ Removes all leading spaces at the start of a string expression. Syntax: -LTrim (Text As String) + +LTrim (Text As String) + Return value: String Parameters: @@ -57,17 +59,19 @@ Example: -Sub ExampleSpaces -Dim sText2 As String,sText As String,sOut As String -sText2 = " <*Las Vegas*> " -sOut = "'"+sText2 +"'"+ Chr(13) -sText = Ltrim(sText2) REM sText = "<*Las Vegas*> " -sOut = sOut + "'"+sText +"'" + Chr(13) -sText = Rtrim(sText2) REM sText = " <*Las Vegas*>" -sOut = sOut +"'"+ sText +"'" + Chr(13) -sText = Trim(sText2) REM sText = "<*Las Vegas*>" -sOut = sOut +"'"+ sText +"'" -MsgBox sOut -end sub + +Sub ExampleSpaces +Dim sText2 As String,sText As String,sOut As String + sText2 = " <*Las Vegas*> " + sOut = "'"+sText2 +"'"+ Chr(13) + sText = Ltrim(sText2) ' sText = "<*Las Vegas*> " + sOut = sOut + "'"+sText +"'" + Chr(13) + sText = Rtrim(sText2) ' sText = " <*Las Vegas*>" + sOut = sOut +"'"+ sText +"'" + Chr(13) + sText = Trim(sText2) ' sText = "<*Las Vegas*>" + sOut = sOut +"'"+ sText +"'" + MsgBox sOut +End Sub + -- cgit v1.2.3