$emsp function

String $emsp([
  1. int length = 1
])

Implementation

String $emsp([int length = 1]) {
  if (length == 1) {
    return ' ';
  } else if (length < 1) {
    return '';
  }

  var s = StringBuffer('&emsp;&emsp;');
  for (var i = 2; i < length; i++) {
    s.write('&emsp;');
  }

  return s.toString();
}