I want to convert strings with letters and numbers to int with int() but i need to eliminate the letters. I know that would mean to eliminate the 3 first characters.
There is a function to eliminate characters of a string?
This is the most powerful tool for that:
https://docs.godotengine.org/en/latest/classes/class_regex.html
- Edited
- Best Answerset by mtcat
Regular expressions are powerful and cool, but if you don't want to figure out how to use them, the String class has methods to do what you want. This link is for Godot 3.5. You didn't specify which version you're using:
https://docs.godotengine.org/en/3.5/classes/class_string.html
DaveTheCoder to_int() looks perfect.i will try that.