toTitleCase static method

String toTitleCase(
  1. String text
)

Capitalize the first letters of every words in the given text. Words in text should be separated with spaces.

final str = "fcode bloc";
final ret = Algo.toTitleCase(str);
print(ret);  // Fcode Bloc

Implementation

static String toTitleCase(final String text) => _toTitleCase(text);