
WRAP(2)                    silmul_efun                    WRAP(2)

名稱
     wrap - 包裝字串(加上換行)

語法
     varargs string wrap(string str, int width);

描述
     Given a string str (and an optional int width), wrap returns
     a string with newline chars inserted so that the string will
     print out "wrapped" to the specified width  (default  is  75
     chars).

     Example:

     write(wrap("test test", 4)); would print out

     test test

     重要事項: Due to an apparent bug in sprintf,  this  routine
     will  REPLACE  characters  in  the   string   with   newline
     characters   instead    of    just    inserting    newlines,
     i.e. write(wrap("1234567890", 5)); will print out

     12345 7890

     (the "6" was replaced by newline) instead of

     12345 67890

其它參考函數
     sprintf();

作者
     Ichabod@TMI, 3/26/93 (documentation)
     wade@future 4/8/1996 翻譯

MudOS Release 0.9         Last change:                   3-19-93

