- Home
·
- String Manipulation
·
- Break a set of strings separated by a single space into the individual strings combined.
Break a set of strings separated by a single space into the individual strings combined.
Break a set of strings separated by a single space into the individual strings combined.
Rate Break a set of strings separated by a single space into the individual strings combined.
(2(2 Vote))
'by a single space into the individual strings combined.
'An example is when you have combined surname, firstname,
'and lastname into a single string separated by a single space, but now
'you want to break them apart again.
'VERY USEFUL WHEN WORKING WITH A DATABASE WHERE THE NEED MAY ARISE
' TO COMBINED DIFFERENT STRINGS, WHICH HAS TO BE SPLIT AGAIN (FOR THE
' PURPOSE OF UPDATING THE INDIVIDUAL STRING BACK TO THE DATABASE
' YOU CAN CONTACT ME FOR FURTHER CLARIFICATION ([email protected])
'Example:
'surname=strSName, firstname=strFname,MiddleName=strMname
Dim strSName as String, strFname as String, strMname as String, br1 As String
'theString is the combined string
strSName = Mid(theString, 1, InStr(1, theString, " "))
br1 = Mid(theString, Len(strSName) + 1, Len(theString) - Len(strSName))
strFname = Mid(br1, 1, InStr(1, br1, " "))
strMname = Mid(br1, Len(strFname) + 1, Len(br1) - Len(strFname))
Break a set of strings separated by a single space into the individual strings combined. Comments
No comments yet — be the first to post one!
Post a Comment