Last active
June 29, 2021 14:01
-
-
Save pablotolentino/63aac7dde5d3d6d2f51635befa215ab1 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) { | |
return 0; | |
} | |
if (texto.length == 0) { | |
return 0; | |
} | |
if (isNaN(texto)) { | |
return 0; | |
} | |
return parseInt(texto); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment