LTrim Function

๋ฌธ์ž์—ด ์‹์˜ ์‹œ์ž‘ ๋ถ€๋ถ„์— ์žˆ๋Š” ๋ชจ๋“  ์„ ํ–‰ ๊ณต๋ฐฑ์„ ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค.

๊ตฌ๋ฌธ:


LTrim (Text As String)

๋ฐ˜ํ™˜ ๊ฐ’:

String

๋งค๊ฐœ ๋ณ€์ˆ˜:

Text: ์ž„์˜์˜ ๋ฌธ์ž์—ด ์‹์ž…๋‹ˆ๋‹ค.

์ด ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ฌธ์ž์—ด ์‹์˜ ์‹œ์ž‘ ๋ถ€๋ถ„์— ์žˆ๋Š” ๊ณต๋ฐฑ์„ ์ œ๊ฑฐํ•ฉ๋‹ˆ๋‹ค.

Error codes:

5 ์ž˜๋ชป๋œ ํ”„๋กœ์‹œ์ € ํ˜ธ์ถœ์ž…๋‹ˆ๋‹ค.

์˜ˆ:


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

Please support us!