Skip to content

Instantly share code, notes, and snippets.

Created October 27, 2017 11:57
Show Gist options
  • Save anonymous/41df9f9bda7bc852b35f83aa44cdedad to your computer and use it in GitHub Desktop.
Save anonymous/41df9f9bda7bc852b35f83aa44cdedad to your computer and use it in GitHub Desktop.
TryCF Gist
<!--- 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>&nbsp;</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>&nbsp;</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