Forum Discussion
Mr_Paritchaya_7
Nimbostratus
Mar 25, 2009How to convert string variable to number?
I want to capture mobile number from http payload and doing mod it by 4 for select pool.
Now I'm confusing about how to convert string variable to integer or number variable for modulation.
Please suggest me about this issue.
when HTTP_REQUEST {
set subid [findstr [HTTP::payload] "subscriberNumber" 0 ""]
now subid is string variable, I think that it can't mod.
set poolid exrp($subid % 4)
}
- hoolio
Cirrostratus
Hi,% expr {7 % 4} 3 % expr {0 % 4} 0 % expr {"7" % 4} 3 % expr {"7" % "4"} 3
- Mr_Paritchaya_7
Nimbostratus
Hi, Aaron, - hoolio
Cirrostratus
Hi Paritchaya,
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects