HTDB : Docs : Designer's Guide : C-Functions
About
Overview
Philosophy
Features
News
Download
Help Us!

Docs
Overview
Designers
Language
Environment
C-Functions
Crypto
Date/Time
Numeric
Strings
HTML
HTDB
SQL
Debugging
System
User/Session
Credit Card
Misc.
S-Functions
Developers
Roadmap
Architecture

Community
Powered By

[home]
class: Strings


${truncAt(target, string)}

input

${truncAt(world, hello world)}
yieldshello  


${shh(string)}

input

${shh(hello world)}
yields  

input

${shh(anything)}
yields  


${nonalnum2underscore(string)}

input

${nonalnum2underscore(hello world!)}
yieldshello_world_  


${space2underscore(string)}

input

${space2underscore(hello world!)}
yieldshello_world!  


${reverse(string)}

input

${reverse(hello world!)}
yields!dlrow olleh  


${eatWhitespace(string)}

input

${eatWhitespace(hello world!)}
yieldshelloworld!  


${lower(string)}

input

${lower(HeLlO wOrLd!)}
yieldshello world!  


${upper(string)}

input

${upper(HeLlO wOrLd!)}
yieldsHELLO WORLD!  


${pretty(string)}

input

${pretty(HeLlO wOrLd!)}
yieldsHello World!  

input

${pretty(bunch-o-text wow)}
yieldsBunch-O-Text Wow  


${substr(start, count, string)}

input

${substr(0, 4, hello world)}
yieldshell  

input

${substr(4, 4, hello world)}
yieldso wo  

input

${substr(4, -4, hello world)}
yieldsello  

input

${substr(4, 1000, hello world)}
yieldso world  


${trunc(maxlen, string)}

input

${trunc(4, hello world)}
yieldshell..  

input

${trunc(1000, hello world)}
yieldshello world  

input

${trunc(0, hello world)}
yields..  


${strlen(string)}

input

${strlen(hello world)}
yields11  


${dbSafe(string)}

input

${dbSafe(we'd "like" $more$ money)}
yieldswe'd like more money  


${pluralize(num, singular, plural)}

input

${pluralize(0, adjective, adjectives)}
yieldsno adjectives  

input

${pluralize(1, adjective, adjectives)}
yields1 adjective  

input

${pluralize(6, adjective, adjectives)}
yields6 adjectives  


${formSafe(string)}

input

${formSafe(we'd "like" $more$ money)}
yieldswe'd 'like' $more$ money  


${prettyWrap([margin,]string)}

input

${prettyWrap(100,when in the course of human events)}
yieldswhen in the course of human events  

input

${prettyWrap(20,when in the course of human events)}
yieldswhen in the course of
human events  

input

${prettyWrap(5,when in the course of human events)}
yieldswhen in
the course
of human
events  

input

${prettyWrap(0,when in the course of human events)}
yields0,when
in
the
course
of
human
events  

input

${prettyWrap(when in the course of human events)}
yieldswhen
in
the
course
of
human
events  

   
8,352 impressions