dart

dart

Inbuilt methods of dart string

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.

Read
dart

An introduction to dart string with examples

The 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 :.

Read
dart

Dart program to check if a string ends or starts with a substring

In 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.

Read
dart

Dart example program to replace a substring

In 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.

Read
dart

Create a random integer, double or a boolean in dart using Random class

Like 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 :.

Read
dart

Dart padLeft and padRight examples

In 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.

Read
dart

Dart replace all substring in a string example

Dart 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.

Read
dart

Dart program to check if an integer is odd or even

Two 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.

Read
dart

For loop in dart : explanation with example

You 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.

Read
dart

How to get the ASCII value of a character in dart

Dart 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