removePrefix method
Implementation
String removePrefix(String value, String prefix) {
if(!value.startsWith(prefix)) {
throw AFException("Expected $value to start with $prefix");
}
final result = value.substring(prefix.length);
return result;
}