- Home
·
- String Manipulation
·
- Get the characters out of a mixed string. Example...337ANC444BBBD77XXC4 will be ANCBBBDXXC
Get the characters out of a mixed string. Example...337ANC444BBBD77XXC4 will be ANCBBBDXXC
Get the characters out of a mixed string. Example..."337ANC444BBBD77XXC4" will be "ANCBBBDXXC"
API Declarations
'TextBox...............Text1
Rate Get the characters out of a mixed string. Example...337ANC444BBBD77XXC4 will be ANCBBBDXXC
(2(2 Vote))
Text1.Text = NoIntegerString(Text1.Text)
End Sub
Public Function NoIntegerString(bla As String) As String
'look at bla. if bla char is an integer then do not show it
'rather save the interger
Dim StringLength As Integer
Dim StringPossition As Integer
Dim WhatIsThis As String
Dim StringOut As String
Dim IntOut As String
StringLength = Len(bla)
StringPossition = 1
Do Until StringPossition = StringLength + 1
WhatIsThis = Mid(bla, StringPossition, 1)
If WhatIsThis = "0" Or WhatIsThis = "1" Or WhatIsThis = "2" Or WhatIsThis = "3" Or WhatIsThis = "4" Or WhatIsThis = "5" Or WhatIsThis = "6" Or WhatIsThis = "7" Or WhatIsThis = "8" Or WhatIsThis = "9" Then
IntOut = IntOut & WhatIsThis
Else
StringOut = StringOut & WhatIsThis
End If
StringPossition = StringPossition + 1
Loop
NoIntegerString = StringOut
End Function
Get the characters out of a mixed string. Example...337ANC444BBBD77XXC4 will be ANCBBBDXXC Comments
No comments yet — be the first to post one!
Post a Comment