expandTabs method

String expandTabs([
  1. int? size
])

expandTabs method sets the tab size to the specified number of whitespaces.

Default size is 8.

Example :

print('a\ta'.expandTabs(2)); // 'a a'

Implementation

String expandTabs([int? size]) =>
    size == null ? this : replaceAll('\t', ' ' * (size - 1));