Last active
February 24, 2021 20:42
-
-
Save trycf/6ce83e51baf869aa3752a8b2bb5a1223 to your computer and use it in GitHub Desktop.
TryCF Gist
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
<cfoutput> | |
<cfset var vReturn = ""> | |
<cfset var s = '9781111111111'> | |
<cfset var i = 0> | |
<cfloop from="1" to="#len(s)#" index="i"> | |
<cfif listFind("1,5,8,11,14,17", i)> | |
<cfset vReturn = vReturn & "/"> | |
</cfif> | |
<cfset vReturn = vReturn & mid(s, i, 1)> | |
</cfloop> | |
#vReturn# | |
<cfset var s = '9781111111111'> | |
#LEFT(s, 13)# | |
</cfoutput> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment