de en es fr
Let the machine help
Light teasing, exhibition, BDSM, sissyfication, watersports... with sounds and pictures


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 searching special chars in a string.
PostPosted: Fri Oct 16, 2015 2:49 pm 
Offline
Veteran
User avatar
I am trying to do the following:
Code:
if(a.charAt(i)== "\"){}
but as \ has scripting issues i assumed:
Code:
if(a.charAt(i)== "\""){}
would work (as when using 'show') but it doesn't seem to.
Code:
if(a.charAt(i)== a.charAt(x)){}
works when the x-1 char is known to be \ but this will obviously not always be a known.

what am i missing?

_________________
"If you don't gosub a program loop, you'll never get a subroutine."


Top
 Profile Send private message 
 
 Re: searching special chars in a string.
PostPosted: Sat Oct 17, 2015 11:33 am 
Offline
Site Admin
User avatar
Your code is ok, full sample :
Code:
def a = "ab\"cd"
if(a.charAt(2)== "\""){
   show("ok")
}


Top
 Profile Send private message 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010 - 2020
This website uses session cookies only.