Last active
February 2, 2017 06:29
-
-
Save xexi/275b94bba64484c3244581617853134d 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
function textbraceTrim(text){ | |
let trimed = text; | |
if(text !== null && text !== '') { | |
let start_index = text.indexOf('('); | |
let end_index = text.indexOf(')') + 1; | |
trimed = text.substring(0, start_index) + text.substring(end_index, text.length); | |
trimed = trimed.trim(); | |
} | |
return trimed; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment