It's such a simple thing but I actually googled this because I couldn't think of it offhand.

CODE:
  1. <cfif len(str)>
  2.      <cfoutput>#str#</cfoutput>
  3. </cfif>

if str has zero characters, len(str) will return 0, mimicking behaviour of false. Cool!

Popularity: 27% [?]

Share and Enjoy:
  • del.icio.us
  • Digg
  • Reddit
  • TwitThis
  • Google Bookmarks
  • StumbleUpon
  • Facebook
  • E-mail this story to a friend!
  • Print this article!