Page 1 of 1

A backwards pos function

Posted: Fri Aug 07, 2009 10:47 am
by ConvertFromOldNGs
by JADE Kid - Ray Hidayat >> Sun, 14 Jan 2001 3:34:13 GMT

I'm not sure if this is the right newsgroup, I was thinking about posting the the Jade_tech_general one. But I consider this a new feature, so I'll post it here.

The current pos function looks forwards. It starts at the start of the string and goes until it meets the end.

A backwards pos function would be nice, because if you see my other post about how the folder class, should have a 'getName' function which tells you what is the name of the folder, I need to get the name of a folder.

Getting the name of the folder means I need to keep searching until I reach the last '\' in the string.

If we have a pos function that goes backwards, then I would instantly find the last '\' in the string. Right now I think I'm going to have to program my own.

--
Ray Hidayat
JADE Kid - 2000
www.jadekids.com

Re: A backwards pos function

Posted: Fri Aug 07, 2009 10:47 am
by ConvertFromOldNGs
by JADE Kid - Ray Hidayat >> Sun, 14 Jan 2001 3:35:28 GMT

Oh sorry! Forget about this, there is a 'reversePos' function. I was thinking about reversing the string and finding the character and stuff, but then I realised that there is a reversePos function.

Thanks for reading my post anyway.

--
Ray Hidayat
JADE Kid - 2000
www.jadekids.com