t_code<T> function

int t_code<T>()

Implementation

int t_code<T>() {
  if (T == int) return 'i'.codeUnitAt(0);
  if (T == double) return 'f'.codeUnitAt(0);
  if (T == bool) return 'b'.codeUnitAt(0);
  if (T == String) return 's'.codeUnitAt(0);
  return 'N'.codeUnitAt(0);
  // throw Exception("Type must be int/double/bool/String");
}