localize static method

String localize(
  1. String global,
  2. String base
)

Implementation

static String localize(String global, String base) {
  global = sanitize(global);
  base = sanitize(base);
  if (global.startsWith(base)) {
    return sanitize(global.substring(base.length));
  } else {
    throw Exception('Not a child');
  }
}