" /> String manipulation in IRD (slightly different from what I can find out here) - Genesys CTI User Forum

Author Topic: String manipulation in IRD (slightly different from what I can find out here)  (Read 1416 times)

Offline jtcm4568

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Advertisement
Hello!

New forum member, been using Genesys for about 2 years.

I have a situation where I need to parse out a URL (for shortening before sending an SMS, if that matters :)) and, if the LAST character in the URL is a period (.) I need to drop it (apparently our shortening service can't do this for us, and we have issues with ONE of the URL's that has a period stuck on the end...yes, that's a far-end application issue, but I'm fixing it.

In Excel (or SQL, for that matter) this would be a fairly trivial matter....something like =LEFT(STRING,LEN(STRING)-1).

However, I can't find a way to do anything like that in IRD. If it was a unique character on the end of the string, I could manage that, but since it's a period (.) it's far too common the see within the URL...

Is there anything I'm missing?

IRD 8.1.400.39

Thank you all for your help!

Offline gen_rtfm

  • Full Member
  • ***
  • Posts: 114
  • Karma: 4
Try using strsub and strlen in combination.
Strlen gives the length of the string you want to trim.

Reduce that number and use strsub to get the substring of the original string up to the result of strlen minus one?

Br

Skickat från min Mi MIX 3 5G via Tapatalk