Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_wraplen() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_WRAPLEN()

 DESCRIPTION

 C_WRAPLEN() returns the size a specified character string would be
 if the string were word-wrapped to the given width.  This function
 works in conjunction with C_WRAP() to word-wrap a character string.

 SYNTAX

 C_WRAPLEN(string, width)

 PARAMETERS

 string (C) is the name of the string to check.  The string is a
 character string with soft carriage returns (ASCII 141) removed and
 tab characters (ASCII 9) expanded.  The functions C_SOFTLEN() and
 C_SOFTCR() can be used to convert the string.

 width (N) is the width the word-wrapped text should be.  The value
 of width should be the same value used when a call to C_WRAP() is made.

 RETURNS

 C_WRAPLEN() returns the size the specified string would be if word-
 wrapped to the given width.

 EXAMPLES

 use test
 xmemo = test->memofld           && store database memo field

 xlen = c_softlen(xmemo)         && | strip out soft carriage returns
 tmp_memo = space(xlen)          && | and expand any tab characters
 c_softcr(xmemo,tmp_memo)        && | using C_SOFTLEN() and C_SOFTCR().

 xlen = c_wraplen(tmp_memo,40)   && determine the size of wrapped text
 new_memo = space(xlen)          && allocate space for new string
 c_wrap(tmp_memo,new_memo,40)    && wrap tmp_memo to 40, place in new_memo


See Also: C_WRAP() C_SOFTLEN() C_SOFTCR() C_VIEWSTR()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson