DocBook|Search
Class Reference
%Library.Utility
   
Server:basexml
Instance:SOAXML
User:UnknownUser
 
-
  [BASEXML] >  [%Library] >  [Utility]
Private  Storage  

abstract class %Library.Utility

Handy utility functions

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
6


Summary

Methods
Center Date DateTime FormatMB Replace
Time


Methods

• classmethod Center(str As %String = "", width As %Integer = 80) as %String
Center text on a line
• classmethod Date(Format As %Integer = 7) as %String
Show the date, for example Sep 26 2003
• classmethod DateTime(Format As %Integer = 7) as %String
Show date and time, for example: Sep 26 2003 5:39 PM
• classmethod FormatMB(val As %Float) as %Float
Used for formatting database and global sizes in MB Returns a minimum of two significant digits
• classmethod Replace(Source As %String = "", FindWhat As %String = "", ReplaceWith As %String = "", MatchCase As %Boolean = 1, ByRef OutputString As %String, Start As %Integer = 1, RepeatCount As %Integer = 0, StartMode As %Integer = 0) as %Integer
Searches in Source the occurrences of FindWhat and replaces them with ReplaceWith.
The Search will be case insensitive if MatchCase=0 (default = 1).
The result of the operation will be placed in OutputString.
The method returns the number of times the replacement occurred.
You can also specify a starting point for the search (Start) and how many occurrences of
FindWhat you want replaced (default: 0 = All). If FindWhat is the empty string, no replacement occurs. StartMode specifies how the Start parameter works. If StartMode=0, Start is a character count like in $Find. If StartMode=1, Start is a FindWhat count. That is, replacing starts at the beginning of the Start-th piece delimited by FindWhat. If Start<0, the find/replace operation works backwards from the end of the string.
• classmethod Time() as %String
Show the time, for example 6:33 PM