Created
December 3, 2015 15:55
-
-
Save djtech42/0757add055afa240e02f to your computer and use it in GitHub Desktop.
Function that returns a string with added grouping notation if it exists
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
def stringOptional(string, preceding="", succeeding="") | |
unless string.nil? | |
return preceding + string + succeeding | |
else | |
return "" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment