Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   =o.. Ideas? (https://forums.graalonline.com/forums/showthread.php?t=69238)

KuJi 10-07-2006 08:49 PM

=o.. Ideas?
 
Hello/Hi/Wow/Wierd/Yeah/How/No/Way/Roar/Why/Hey/Ya/Boo/My/Rank/is/KuJirox

How would I be able to substring to the last "/" in that statement. It can always be different so a direct substring wouldn't work.. I was thinking while (this.rank.substring("pos") >= 1) you'd resubstring it or something.

If ya got an idea how to do such, tell =o

xXziroXx 10-07-2006 09:02 PM

Quote:

Originally Posted by KuJi (Post 1227374)
Hello/Hi/Wow/Wierd/Yeah/How/No/Way/Roar/Why/Hey/Ya/Boo/My/Rank/is/KuJirox

How would I be able to substring to the last "/" in that statement. It can always be different so a direct substring wouldn't work.. I was thinking while (this.rank.substring("pos") >= 1) you'd resubstring it or something.

If ya got an idea how to do such, tell =o

I would probably do:

PHP Code:

this.txt "Hello/Hi/Wow/Wierd/Yeah/How/No/Way/Roar/Why/Hey/Ya/Boo/My/Rank/is/KuJirox";
echo(
this.txt.tokenize("/")[this.txt.tokenize().size()-1]); 


KuJi 10-07-2006 10:06 PM

Quote:

Originally Posted by xXziroXx (Post 1227385)
I would probably do:

PHP Code:

this.txt "Hello/Hi/Wow/Wierd/Yeah/How/No/Way/Roar/Why/Hey/Ya/Boo/My/Rank/is/KuJirox";
echo(
this.txt.tokenize("/")[this.txt.tokenize().size()-1]); 


You can do that o.O


All times are GMT +2. The time now is 04:46 PM.

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