ARRANGE_STRING(1) ARRANGE_STRING(1)
NNAAMMEE
_a_r_r_a_n_g_e___s_t_r_i_n_g_(_) - arranges a string to a given length
SSYYNNOOPPSSIISS
string arrange_string(string str, int x)
DDEESSCCRRIIPPTTIIOONN
Passed a string and a length, this function returns the
original string either cut to or extended to the length
specified by the second argument. If the length of the
original string is longer than the length specified, then
all characters beyond the length specified are cut off.
If the length is less than the original string's length,
then the original string is padded with spaces so that it
ends up being as long as the length specified.
EEXXAAMMPPLLEESS
+o arrange_string("resistence is futile", 25) returns
"resistence is futile "
+o arrange_string("gurble", 2) returns "gu"
NNOOTTEESS
Do not use this function inside the mudlib, as it is slow.
Instead use _s_p_r_i_n_t_f_(_). This SimulEfun exists to make life
easy on creators.
LLOOCCAATTIIOONN
/secure/SimulEfun/strings.c
SSEEEE AALLSSOO
_c_e_n_t_e_r_(_), _w_r_a_p_(_)
AAuutthhoorr
Descartes of Borg
1