Error running script: Function not found: 'RTrim'

Korpsian
Trying to call this function which i found in the documentation of Quest but i only get the massage that the function not exists.

I included the Core library. Any ideas?

The Pixie
The documentation is kind of misleading. It reads like the function has no return type, and so you might imagine this would work:
s = "  fghjh gjh  "
RTrim(s)
msg(s)

In fact, it returns a new string, the result of the trimming, so you have t do this:
s = "  fghjh gjh  "
s = RTrim(s)
msg(s)

or this:
s = "  fghjh gjh  "
msg(RTrim(s))

Korpsian
oh ok now i got it. thx for the help... ok that helps for this problem.

But now i want to trim down letters or numbers from a string which is not possible with this U.U is there also a way to do this?

The Pixie
You can always iterate through the string, handling each character in turn.
for (i, 1, LengthOf(s)) {
c = Mid(s, i, 1)
// Do stuff with c
}

Korpsian
thank you!

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums