divideup — make Camel-style text more readable and add HTML markup
use Wacs;
scalar divideup( | original_text, | |
divider, | ||
already_small_font) ; |
scalar original_text
;scalar divider
;scalar already_small_font
;The divideup
function returns a more
readable version of the so-called Camel Style wording used in
creating WACS directories. It also embeds HTML directives to
try and ensure that even long entries don't take up too much space.
The first argument is the original text (typically the field
stitle from the sets database), the second (divider) is typically
the HTML break tag <br>
but could be
other things like a table divider sequence </td><td>
.
The third parameter signifies whether the font in use is already small -
if set to 0 (zero), HTML tags to reduce the font size be based on using
size is -1 for long lines; if it's set to 1 (one) it'll be assumed they
were already using size is -2, and will therefore use size = -3.
As from Wacs 0.8.5, -1 is also available which suppresses the resizing
of long lines if required.