Bugreport: String functions are broken

Simulated dice for role playing games
Post Reply
echelonIV
Posts: 16
Joined: Sun Mar 06, 2011 11:31 am
IQ Test: Orange

Bugreport: String functions are broken

Post by echelonIV » Sun Mar 06, 2011 5:51 pm

Hey all,

I was wondering if the string functions are known to be broken?
The documentation states:
Left/Right
Takes a string and a length X, returning the first X character of the string.
left("abcd", 2) = "ab"
right("abcd", 2) = "cd"

substr
Takes a string and a position X, and a length Y, returning the Y characters starting at X.
substr("abcd", 2, 1) = "b"
When executing the following code:

Code: Select all

substr("abcd", 2, 1)
returns "ab", seems to ignore the position parameter.

Code: Select all

left("abcd",2)
returns an empty string. Same with right.

I did a search on the forums to see if anyone else ran into the same problem, but that didn't seem to be the case.

gandreas
Immortal
Posts: 1464
Joined: Wed Feb 04, 2004 6:02 pm
Contact:

Re: Bugreport: String functions are broken

Post by gandreas » Mon Mar 07, 2011 2:35 pm

Not a known problem - I'll investigate and see what's up

BeeJay
Posts: 17
Joined: Wed Jul 27, 2011 8:22 am
IQ Test: Orange

Re: Bugreport: String functions are broken

Post by BeeJay » Sat Jan 04, 2014 8:12 pm

Sorry to Necro a thread but this is still an issue.

Code: Select all

substr("abc",2,1)
Returns "ab" instead of "a"

Image

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests