-- UnsafeSTPRubicon.Mesa

UnsafeSTPRubicon: DEFINITIONS = {

AppendCharAndGrow: PROC [
    to: LONG POINTER TO LONG STRING, c: CHARACTER, z: UNCOUNTED ZONE];

AppendStringAndGrow: PROC [to: LONG POINTER TO LONG STRING,
    from: LONG STRING, z: UNCOUNTED ZONE];

CopyToNewString: PROC [s: LONG STRING, z: UNCOUNTED ZONE]
    RETURNS [newS: LONG STRING];

EmptyString: PROCEDURE [s: LONG STRING] RETURNS [BOOLEAN] = INLINE {
    RETURN[s = NIL OR s.length = 0]};

FreeString: PROCEDURE [z: UNCOUNTED ZONE, s: LONG STRING] = INLINE {z.FREE[@s]};

Replace: PROC [to: LONG POINTER TO LONG STRING, from: LONG STRING,
    z: UNCOUNTED ZONE];

StringLength: PROCEDURE [s: LONG STRING] RETURNS [CARDINAL] = INLINE {
    RETURN[IF s = NIL THEN 0 ELSE s.length]};

}.