Table of Content
HAL Forum
procedure StrWordWrap (
string Text,integer Limit,var array string Wrapped)
Description:
Word-wraps a string and returns the lines as a string array.
Parameters:
Text The string containing sentences to word-wrap.
Limit Line length in characters
Wrapped The array that will be filled with the wrapped lines (starting from 0)
global
procedure OnApplicationStartup() 
begin
  string 255 text;
  integer i;  
  array string 35 wrapped,wrapped2;
  
  text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur feugiat metus id erat";
  text = text & "luctus venenatis. Nullam eleifend venenatis dignissim. Cum sociis natoque penatibus";
  text = text & "et magnis dis parturient montes, nascetur ridiculus mus. Sed mi nisl";
  text = StrWordWrap(text,30,wrapped);
  for(i=0;len(wrapped[i])>0;i=i+1) begin
    LogText(0,wrapped[i]);
  end;
  
  return;
end;
Related topics:
««