- Home
·
- String Manipulation
·
- Trim all extra characters in a string and alterate / change then into a normal value char...¨¨¨¨¨ w
Trim all extra characters in a string and alterate / change then into a normal value char...¨¨¨¨¨ w
Trim all extra characters in a string and alterate / change then into a normal value char...¨¨¨¨¨ will turn into aeiou...very useable on an
Rate Trim all extra characters in a string and alterate / change then into a normal value char...¨¨¨¨¨ w
(1(1 Vote))
'Use TrimXChars [STRING TO TRANSFORM], [WORD CASE]
'[STRING TO TRANSFORM]
' Any string value
'[WORD CASE]
' Use 1 to return UpperCase value
' Use -1 to return LowCase value
AXChars = "áàãâäª"
EXChars = "éèêë€&"
IXChars = "íìîï"
OXChars = "óòõôö"
UXChars = "úùûüµ"
NullXChars = "„†‡‰Š‹Œ“”•—˜™š›œŸ¡¤¥¦¿«®¯±¶¸»¼½¾…ƒ?!#§+-=_¢©ç$¨~^´`'.,;:@¹²³£¬()]}[{/\|" '%* not included 'cause they're SQL-Query criteria types
'Analyze Aa Characters
For i = 1 To Len(AXChars)
arg = Replace(arg, Mid(AXChars, i, 1), "a", 1)
arg = Replace(arg, UCase$(Mid(AXChars, i, 1)), "A", 1)
Next
'Analyze Ee Characters
For i = 1 To Len(EXChars)
arg = Replace(arg, Mid(EXChars, i, 1), "e", 1)
arg = Replace(arg, UCase$(Mid(EXChars, i, 1)), "E", 1)
Next
'Analyze Ii Characters
For i = 1 To Len(IXChars)
arg = Replace(arg, Mid(IXChars, i, 1), "i", 1)
arg = Replace(arg, UCase$(Mid(IXChars, i, 1)), "I", 1)
Next
'Analyze Oo Characters
For i = 1 To Len(OXChars)
arg = Replace(arg, Mid(OXChars, i, 1), "o", 1)
arg = Replace(arg, UCase$(Mid(OXChars, i, 1)), "O", 1)
Next
'Analyze Uu Characters
For i = 1 To Len(UXChars)
arg = Replace(arg, Mid(UXChars, i, 1), "u", 1)
arg = Replace(arg, UCase$(Mid(UXChars, i, 1)), "U", 1)
Next
'Analyze Null Characters
For i = 1 To Len(NullXChars)
arg = Replace(arg, Mid(NullXChars, i, 1), " ", 1)
Next
'Return the True Value String to compare with
TrimXChars = Trim$(arg)
If charCase = -1 Then
TrimXChars = LCase$(TrimXChars)
ElseIf charCase = 1 Then
TrimXChars = UCase$(TrimXChars)
End If
End Function 'Copyright©2003 - tHuNd3rSp0t's
Trim all extra characters in a string and alterate / change then into a normal value char...¨¨¨¨¨ w Comments
No comments yet — be the first to post one!
Post a Comment