startsWith function

bool startsWith(
  1. String searchString,
  2. String s, [
  3. int? position
])

Checks if a string starts with a substring.

print(startsWith('hel', 'hello')); // Outputs: true

Implementation

bool startsWith(String searchString, String s, [int? position]) =>
    s.startsWith(searchString, position ?? 0);