VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Selects every character from the left side of a string, up until a specified character.

by VB-Kung-Fu (19 Submissions)
Category: String Manipulation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 9th October 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Selects every character from the left side of a string, up until a specified character.

Rate Selects every character from the left side of a string, up until a specified character.



If Trim(str) = "" Or Character = "" Then Exit Function
'get the selection if the character exists, if it doesnt,Left() returns an empty str
Left2Char = Left(str, InStr(1, str, Character, CompareMode))
End Function


Download this snippet    Add to My Saved Code

Selects every character from the left side of a string, up until a specified character. Comments

No comments have been posted about Selects every character from the left side of a string, up until a specified character.. Why not be the first to post a comment about Selects every character from the left side of a string, up until a specified character..

Post your comment

Subject:
Message:
0/1000 characters