-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add possibility to convert string to number #130
Comments
I achieved this using the 'times' filter, this fix the integer variables that turned to string after manipulating and capture
Anyway, would be great if a filter is available to transform string to integer or a capture_integer method. |
@asumaran when using |
@phoet Yes, but the color_counter variable turns into string when is captured after the plus operation. So that's why I use the times filter to ensure the img_index is numeric when the loop starts again. Update: I just tried your method and seems works fine too, however your method is more explicitly, I'll consider it for the next time. |
@asumaran so i think that you can close the issue |
Closing for now. Please re-open if still an issue. |
Generally, do a |
We need possibility to convert string to number, it is basic feature in programing, and there are a lot of awful workarounds on forums to overcome lack of such conversion, so we all need it urgently.
Consider following example:
assuming that there is a need to display a special message if the user has selected 20 or more items with the word 'orange' in their title:
Another code:
The text was updated successfully, but these errors were encountered: