Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-20-2007, 07:39 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Question!

How would I check if a string begins with > " <?
Reply With Quote
  #2  
Old 04-20-2007, 08:14 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Bah, this was the only thing that popped up in my head:

PHP Code:
function onCreated()
{
  
"\"Test\"";
  if (
a.starts(("\"\"").substring(1)))
    echo(
"foo");

if you was talking about if a string started with ", as in "Test ing" for example :o

I think there is an easier way, but couldn't think of one
__________________
Reply With Quote
  #3  
Old 04-20-2007, 08:19 PM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
if (a.charat(1) == '"') ...
__________________

Coming soon (Hopefully:P)
Reply With Quote
  #4  
Old 04-20-2007, 08:24 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by JkWhoSaysNi View Post
if (a.charat(1) == '"') ...
if (a.charat(0) == '"')

but yeah, obj.charat() would be better :o
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:30 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.