Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What's wrong with this string?
#1
Code:
Copy      Help
str URLStrChars="! # $ % & ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ { | } ~"
str* usc=StringToArray(URLStrChars)
for(i 0 SA_Len(usc)) out usc[i]
All I get for output is: _

I just did a test and found that:
SA_Len(usc) = 1
Instead of 29.

I know that StringToArray and SA_Len work because I've tested them with other strings.

Note: For those who don't know, StringToArray and SA_Len are from elsewhere in this forum by Gintaras.
Just say HEMP!
#2
By default, all these characters except _ are delimiters. Specify space as second argument.

str* usc=StringToArray(URLStrChars " ")


Forum Jump:


Users browsing this thread: 1 Guest(s)