class String

namespace sys.core.lang
class String

Constructors

this

this{data: Char};
this{chars: Slice};
this{chars: Ptr, len: PtrSize};
this{chars: String, len: PtrSize};
this{chars: String, start: PtrSize, end: PtrSize};
this{chars: Ptr, len: PtrSize, cap: PtrSize};
this{chars: CArray};
this{chars: CArray, len: PtrSize};
this{obj: String};
this{move obj: String};

Brief

Parameters

data=>
chars=>
len=>
start=>
end=>
cap=>
obj=>

FromIndex

this FromIndex{chars: String, start: PtrSize};
this FromIndex{chars: String, start: PtrSize, end: PtrSize};

Brief

Parameters

chars=>
start=>
end=>

TakeOwnership

this TakeOwnership{chars: Ptr, len: PtrSize};

Brief

Parameters

chars=>
len=>

Methods

@attr

def @attr(obj: String);
def @attr(move obj: String);

Brief

Parameters

obj=>

Clear

def Clear();

Brief


@eq

func @eq(second: String): Bool;

Brief

Parameters

second=>

Returns


@neq

func @neq(second: String): Bool;

Brief

Parameters

second=>

Returns


@shl

def @shl(ch: Char): ref String;
def @shl(str: String): ref String;

Brief

Parameters

ch=>
str=>

Returns


Insert

def Insert(pos: PtrSize, string: String);

Brief

Parameters

pos=>
string=>

Inserted

func Inserted(pos: PtrSize, string: String): String;

Brief

Parameters

pos=>
string=>

Returns


Find

func Find(b: Byte): PtrSize;
func Find(b: Byte, start: PtrSize): PtrSize;
func Find(b: CArray): PtrSize;

Brief

Parameters

b=>
start=>

Returns


RFind

func RFind(b: Byte): PtrSize;
func RFind(b: Byte, start: PtrSize): PtrSize;
func RFind(b: CArray): PtrSize;

Brief

Parameters

b=>
start=>

Returns


Split

func Split(b: Byte): Vector;

Brief

Parameters

b=>

Returns


Trimmed

func Trimmed(): String;

Brief

Returns


@write

func @write(ref stream: Stream);
func @write(ref stream: Stream, format: OutputFormat);

Brief

Parameters

stream=>
format=>

@put

func @put(ref stream: Stream);

Brief

Parameters

stream=>

@get

def @get(ref stream: Stream);

Brief

Parameters

stream=>

Properties

Length

property Length: PtrSize

Brief


Capacity

property Capacity: PtrSize

Brief


@index

property @index: ref Byte; get;

Brief


IsEmpty

property IsEmpty: Bool; get;

Brief


SysDataPointer

property SysDataPointer: Ptr; get;

Brief

Variables

GrowthSpacing

val GrowthSpacing;

Brief