Discussions related to Visual Prolog
Harrison Pratt
VIP Member
Posts: 439
Joined: 5 Nov 2000 0:01

string::wrapString/4 documentation

Unread post by Harrison Pratt »

wrapString : (string String, charCount HyphenLength, charCount MaxLength, string Indent) -> string* Lines.
% @short
% @detail #HyphenLength <= #MaxLength
% @example
% % All the statements below succeed:
% ["123456","7890"] = string::wrapString("1234567890", 6, 6, "")
% ["123456","7890"] = string::wrapString("1234567890", 2, 6, "")
% @end

I believe that the second example should read:

["12", "34", "56", "78", "90"] = string::wrapString("1234567890", 2, 6, "")

It is not clear to me what the MaxLength parameter is intended to control in this predicate.

It is useful that wrapString/4 handles breaking on tab, ':', ';' and ',' characters.
Post Reply