StringLen in rules ?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Micha_he
Normal user
Posts: 372
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

StringLen in rules ?

#1 Post by Micha_he » 13 Jul 2023, 12:58

I have a string variable like '1356' or '246' (interpret sprinkling areas) from which I want to process all single digits in a rule with the substring-command.
Is there any possibility to determine the end of the string, like StringLen() or something similar?

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: StringLen in rules ?

#2 Post by TD-er » 13 Jul 2023, 13:02

You could assign it to a variable and thus turn it into a numerical.
Then just divide it by 10 and check if its [int#N] representation is still > 0.

Micha_he
Normal user
Posts: 372
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: StringLen in rules ?

#3 Post by Micha_he » 13 Jul 2023, 13:09

Not optimal/pretty, but could work. Good that the segments start with 1 for me ;)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 32 guests