| | |
string handling
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
Hi,
Try this code:
It is a function that receives the string you want to separate, and returns the separated string.
Hope it helps.
Try this code:
VB Syntax (Toggle Plain Text)
Private Function SeparateString(str As String) As String Dim x As Integer Dim retStr As String retStr = "" For x = 1 To Len(str) retStr = retStr & Mid(str, x, 1) & "," Next x SeparateString = retStr End Function
Hope it helps.
-- MartÃn
•
•
Join Date: Jul 2008
Posts: 4
Reputation:
Solved Threads: 1
I have a regsubex function, and in that case all you would need to call, is regsubex(String,"\B",chr(44)) :-) vb Syntax (Toggle Plain Text)
Public Function regsubex(Text As String, Pattern As String, ReplaceVar As String) As String Dim myRegExp As RegExp Set myRegExp = New RegExp myRegExp.IgnoreCase = True myRegExp.Global = True myRegExp.Pattern = Pattern Dim txt As String txt = myRegExp.Replace(Text, ReplaceVar) regsubex = txt End Function
![]() |
Similar Threads
- string (C)
- Terminating a String (C)
- Confusion in string handling? (C)
- Dev Pascal string help. (Pascal and Delphi)
- This may be a stupid question.... (C++)
- C++ String (C++)
- C++ handling of strings in a boolean expression (C++)
- Need help in thread handling pplease read (Java)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: editting existing txt file data
- Next Thread: read multi line txt.file and display in textbox
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





