Solución
solution.tsTypeScript
public class Solution {
public boolean startsWith(String text, String prefix) {
if(prefix == ""){
return true;
}
if(text.length() < prefix.length()){
return false;
}
int prefixCount = prefix.length();
String texto = text.substring(0,prefixCount);
return texto.equals(prefix);
}
}0respuestas