Created
October 27, 2017 11:57
-
-
Save anonymous/41df9f9bda7bc852b35f83aa44cdedad 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
<!--- script syntax ---> | |
<cfscript> | |
password = 'Password123'; | |
password_firstchar = left(password,1); | |
password_lastchar = right(password,1); | |
writeOutput('<p>using script syntax</p>'); | |
writeOutput(password_firstchar & '***' & password_lastchar); | |
writeOutput('<p> </p>'); | |
writeOutput(password_firstchar); | |
writeOutput(repeatString('.',len(password)-2)); | |
writeOutput(password_lastchar); | |
</cfscript> | |
<!--- tag syntax ---> | |
<cfset password = 'Password123'> | |
<cfset password_firstchar = left(password,1)> | |
<cfset password_lastchar = right(password,1)> | |
<cfoutput> | |
<p>using tag syntax</p> | |
#password_firstchar#***#password_lastchar# | |
<p> </p> | |
#password_firstchar# | |
#repeatString('.',len(password)-2)# | |
#password_lastchar# | |
</cfoutput> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment