String in dart is a sequence of UTF-16 characters. The String class comes with a lot of different methods. In this post, we are listing these methods below with a short description for each.
ReadThe string is a sequence of characters. In dart, a string is consists of a sequence of UTF 16 code units. Each character in dart is consists of multiple code points. Each code point again consists of one or two code units. Following are the types of string supported in dart :.
ReadIn this dart tutorial, we will learn how to check if a string is ending with or starting with a substring. Our program will ask the user to enter a string first. It will again ask the user to enter a substring. It will print out the result if the substring is found at the end or start of the string.
ReadIn this tutorial, we will learn how to replace a part of a string in dart. Dart string class comes with a method called replaceRange, that we can use to replace a part of the string with a different string. In this tutorial, we will learn how to use replaceRange with an example in Dart.
ReadLike most other programming languages, dart has one built-in random number generator class. It is defined in the dart:math library package. You can create one random integer, double or boolean using this random number generator class. In this post, I will show you how to do that with different examples. Let's have a look :.
ReadIn this tutorial, we will learn how to use padLeft and padRight methods in dart with different examples. Both of these methods are used to pad a string on the left or right.
ReadDart provides one method called replaceAllMapped to replace all substring in a string easily. In this blog post, we will learn how to use this method with an example.
ReadTwo different ways in Dart to check if an integer is odd or even. We will use the isEven, isOdd properties and modulo operator to check odd/even values in two Dart examples.
ReadYou will find for loop in almost all programming languages. The syntax of a for loop is almost the same. The for loop runs for a specific number of times. It checks one condition and keeps iterating through the code in the loop until the condition is true. In this tutorial, we will learn how to use a for loop in dart with examples.
ReadDart program to get the ASCII value of a character. Dart String class provides two different methods to get the code unit of a character in the string or to get all code units.
Read