I was trying to create a simple method to convert a string to lowercase/uppercase characters preserving the quotes, that it, what it is included in quotes is not affected. I tried with a regex, but I find problems when more than one quoted text is present in the string. Probably it’s not the right tool.
Do you have suggestions for a more straightforward way to achieve that?
Function UppercaseAroundQuotes (s As String) As String
dim parts() as string = s.Split( """" )
for i as integer = 0 to parts.Ubound step 2
parts( i ) = parts( i ).Uppercase
next
return join( parts, """" )
End Function