I want the find the first vowel in a string (apellidoPat) for example if my string it's "CRUZ" my expexted output is : "U" to concatenate in rfc what can I use ? a loop ??
- rfc : first letter of apellidoPat + first vowel of apellidoPat + irst letter of apellidoMat + date (YYMMDD)
I have all except first vowel of apellidoPat
private String getRFC() {
String rfc = "";
String apellidoPat = "CRUZ";
String apellidoMat = "HERNANDEZ";
String nombre = "JAVIER";
String fechaNac = "1997-12-25";
rfc = apellidoPat.substring(0,1) + "FIST VOWEL apellidoPat" + apellidoMat.substring(0,1) + nombre.substring(0,1) + fechaNac.substring(2,4) + fechaNac.substring(5,7) + fechaNac.substring(8,10);
// Expected output: CUHJ971225
return rfc
}