Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Question! (https://forums.graalonline.com/forums/showthread.php?t=73579)

Chandler 04-20-2007 07:39 PM

Question!
 
How would I check if a string begins with > " <?

Chompy 04-20-2007 08:14 PM

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 :(

JkWhoSaysNi 04-20-2007 08:19 PM

if (a.charat(1) == '"') ...

Chompy 04-20-2007 08:24 PM

Quote:

Originally Posted by JkWhoSaysNi (Post 1301441)
if (a.charat(1) == '"') ...

if (a.charat(0) == '"')

:p but yeah, obj.charat() would be better :o


All times are GMT +2. The time now is 01:43 PM.

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