Home | Reviews | GUIpedia | Forum | Fun500


agumaWhat\'s wrong with my code?
What's wrong with my code? It's supposed to return a string without the quotes but it doesn't work! [code] s$ = strtok (""," ") If left$(s$,1) = quo Then If left$(s$,1) = quo Then s$ = right$(s$,Len(s$)-1) s$ += strtok("",quo) If right$(s$,1) = quo Then s$ = left$(s$,Len(s$)-1) End If [/code] EDIT: Never mind, I just realized I made it work only if the string has a space in the middle of it. :P Well, never mind then.
2009-04-117:18 PM

ToddRe:What\'s wrong with my code?
To remove quotes, I'd do this: [code] function noquotes$ (s$) s1$ = ltrim$(rtrim$(s$)) if left$(s1$, 1) = chr$(34) then s1$ = mid$(s1$, 2) if right$(s1$, 1) = chr$(34) then s1$ = left$(s1$, len(s1$)-1) noquotes$ = s1$ end function [/code]
2009-04-118:43 PM

Other


2021 Brandon Cornell