Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-09-2009, 06:02 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Array Slicing

This is probably a bit of a large request because it involves the syntax of the language itself, but having slicing syntax similar to that of Python would be really useful.
For example:
PHP Code:
foo "bar";
baz foo[0:1]; // return a slice from index 0 to 1
echo(baz);      // will echo "ba"
baz foo[:-1]; // return a slice from the end
echo(baz;       // will echo "r" 
It's extremely useful and shortens common string and array operations greatly.
Really, better support for treating strings as arrays in general would be nice.
Reply With Quote
 


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 04:07 PM.


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