Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

dart
communitycreator

What is toUpperCase() in Dart?

Harris Amjad

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

The toUpperCase() function converts a string to uppercase.

The image below shows a visual representation of the toUpperCase() function.

Visual representation of the toUpperCase() function

Syntax

string_name.toUpperCase()

string_name is the name of the string that is to be converted to uppercase.

Parameter

The toUpperCase() function does not require a parameter.

Return value

The toUpperCase() function returns a string that is converted to uppercase.

Code

The code below shows how to use toUpperCase() in Dart.

import 'dart:convert';
void main() {
//string
print("('educative').toUpperCase(): ${("educative").toUpperCase()}");
//string with number
print("('educative09').toUpperCase(): ${("educative09").toUpperCase()}");
}

RELATED TAGS

dart
communitycreator

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring