# $EPIC: left.txt,v 1.4 2006/08/01 04:12:59 sthalik Exp $ ======Synopsis:====== $__left__( ) ======Technical:====== * If is omitted, this function returns the empty string. * If is omitted, this function returns the empty string. * If is less than 0, this function returns the empty string. * If is more than characters long, then this function will return a copy of the first characters in . * If is less than or exactly characters long, then this function will return a copy of ======Practical:====== Whenever you need to extract the initial part of a string, you would use this function to get it. This is more useful for fixed-format strings. ircII used to use $left($[[index]]( ) ) to extract the part of that was before . In EPIC, use $[[before]]( ) because it is faster, more clear, and doesn't require two copies of , which may be important if is a function call. ======Returns:====== The first characters in . No padding is done. If you need a string that is always characters long, try: $pad( " " $left( )) ======Examples:====== $left(5 biklmnopstv) returns "biklm" $left(15 biklmnopstv) returns "biklmnopstv" $left(-2 biklmnopstv) returns nothing $left($index(@ $userhost()) $userhost()) returns a username in an /on. -- Note that this construction is obsolete, but is still used by some. ======History:====== This function first appeared in ircII.