Created
June 29, 2021 04:38
-
-
Save pablotolentino/8e5e62829d8e7da780406eab44cdad24 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static convertirAEntero(texto): number { | |
if (texto !== null) { | |
if (texto.length > 0) { | |
if (!isNaN(texto)) { | |
return parseInt(texto); | |
} else { | |
return 0; | |
} | |
} else { | |
return 0; | |
} | |
} else { | |
return 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment