dart
Convert string to integer Dart Program
We can use int.parse() method in dart programming language to convert a string to the integer type.
void main() {
String numStr = "10";
int num = int.parse(numStr);
print(num + 10);
}
Output
20
Was this helpful?
Similar Posts
- Dart Program to convert a number to string
- Dart program to capitalize the first letter of a string
- Dart Program to generate unique id using uuid package
- Dart Program to add Single or Multiple Items to a List
- Dart Program to update or replace List items or values
- Dart program for condition based item removal from a list
- Dart Program to remove the last element from a List