Index

Package: Support

Description

package Support is

Subprograms & Entries

*

function "*"
( i: Integer;
f: Float ) return Float;

*

function "*"
( f: Float;
i: Integer ) return Float;

/

function "/"
( i: Integer;
f: Float ) return Float;

/

function "/"
( f: Float;
i: Integer ) return Float;

-

function "-"
( f: Float;
i: Integer ) return Float;

-

function "-"
( i: Integer;
f: Float ) return Float;

+

function "+"
( f: Float;
i: Integer ) return Float;

+

function "+"
( i: Integer;
f: Float ) return Float;

**

function "**"
( l, r: Long_Float ) return Long_Float;

Constrain

function Constrain
( val, min, max: Float ) return Float;

Constrain

function Constrain
( val, min, max: Integer ) return Integer;

Div_Ceil

function Div_Ceil
( a, b: Integer ) return Integer;

Floor

function Floor
( x: Float ) return Integer;

Max

function Max
( a, b: Integer ) return Integer;

Max

function Max
( a, b: Float ) return Float;

Min

function Min
( a, b: Integer ) return Integer;

Min

function Min
( a, b: Float ) return Float;

&

function "&"
( l: String;
r: Unbounded_String ) return String;

&

function "&"
( l: Unbounded_String;
r: String ) return String;

Capitalize

function Capitalize
( str: String ) return String;
Capitalizes the words in the string using a set of delimiters.

Case_Eq

function Case_Eq
( l, r: String ) return Boolean;

Case_Eq

function Case_Eq
( l, r: Unbounded_String ) return Boolean;

Case_Eq

function Case_Eq
( l: Unbounded_String;
r: String ) return Boolean;

Case_Eq

function Case_Eq
( l: String;
r: Unbounded_String ) return Boolean;

Ends_With

function Ends_With
( str: String;
ending: String ) return Boolean;
Returns True if 'str' ends with 'ending'. Comparison is case sensitive.

Iterate_Words

procedure Iterate_Words
( phrase: String;
examine: access procedure( word : String ) );
Iterate over words in a string separated by whitespace.

Replace

function Replace
( str: String;
from, to: Character ) return String;
Replaces all 'from' characters in a string with 'to' characters.

File_Length

function File_Length
( path: String ) return Long_Integer;
Returns -1 if the file does not exist.

Source_Ref_To_Unit_Name

function Source_Ref_To_Unit_Name
( ref: String ) return String;
Extracts a readable Ada unit name from a source reference line. If the source reference doesn't contain symbols then an empty string will be returned because the unit name can't be determined.

Contains

function Contains
( ax1, ay1, ax2, ay2, bx, by: Integer ) return Boolean;
Returns True if rectangle A contains point B.

Grid_Snap

function Grid_Snap
( point: Integer;
gridSize: Positive;
centered: Boolean := False ) return Integer;
Returns the value of 'point' as it would be snapped to a grid of size 'gridSize'. If 'centered' is True, the snap will occur in the middle of the grid lines instead of on them.

Intersect

function Intersect
( ax1, ay1, ax2, ay2, bx1, by1, bx2, by2: Integer ) return Boolean;
Returns True if rectangles A and B intersect.

Image

function Image
( i: Integer ) return String;

Image

function Image
( u: Unsigned_32 ) return String;

Image

function Image
( f: Float;
precision: Natural := 3 ) return String;
Returns a string image of a floating point number, where 'precision' is the number of places after the decimal to render.