Created
February 24, 2021 20:42
-
-
Save trycf/b3371c6db7b5e4844d0feb1a39a943ee 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# | |
<br><br> | |
<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