indent.c

skylib_fluffos_v3/mudlib/secure/simul_efun/indent.c · 436 B

From the archive skylib_fluffos_v3.zip

Download the archive   « Back to the archive contents

#if !efun_defined(indent)
/**
 * This method indents the input string by the specified
 * amount of characters.
 * @param str the string to indent
 * @param indent the number of characters to indent by
 * @param cols the total width of the indented text
 * @return the indented string
 */
string indent( string str, int indent, int cols ) {
    return sprintf("%*=s%-=*s", indent, "", cols - indent - 1, str );
} /* indent() */
#endif

Site Stats

Snippets: 1791
Codebases: 571