size function

int size(
  1. String s
)

Returns the length of a string.

print(size('hello')); // Outputs: 5

Implementation

int size(String s) => s.length;