Get First 2 Letters Of String In Capital Letterflutter

[Solved] Get First 2 Letters Of String In Capital Letterflutter | Swift - Code Explorer | yomemimo.com
Question : flutter uppercase first letter

Answered by : defiant-dogfish-ta2iim6gkscl

extension StringExtension on String { String capitalize() { return "${this[0].toUpperCase()}${this.substring(1).toLowerCase()}"; }
}
// use the StringExtension like this
import "string_extension.dart";
var someCapitalizedString = "someString".capitalize();

Source : https://stackoverflow.com/questions/29628989/how-to-capitalize-the-first-letter-of-a-string-in-dart | Last Update : Thu, 20 Jan 22

Question : first letter capital flutter

Answered by : ugliest-unicorn-k2o0rplomit8

extension CapExtension on String { String get inCaps => '${this[0].toUpperCase()}${this.substring(1)}'; String get allInCaps => this.toUpperCase(); String get capitalizeFirstofEach => this.split(" ").map((str) => str.capitalize).join(" ");
}

Source : https://stackoverflow.com/questions/29628989/how-to-capitalize-the-first-letter-of-a-string-in-dart | Last Update : Mon, 29 Mar 21

Question : get first 2 letters of string in capital letterflutter

Answered by : ilham-guenane

Text.substring(0, 2).toUpperCase()

Source : | Last Update : Thu, 12 May 22

Answers related to get first 2 letters of string in capital letterflutter

Code Explorer Popular Question For Swift