string_insert

Overloaded function inserting one character or other string at desired position.

Declaration

fn (str: *string, index: s32, v: u8) bool #inline

Description

Insert one character into str at index and return true when character was inserted.

Note

The input str can be reallocated when index is equal to input string len and more space is needed.

Arguments

  • str Valid pointer to input string.

  • index Position in the string, could be equal to input string len.

  • v Character to be inserted.

Result

Returns true when character was inserted.


Declaration

fn (str: *string, index: s32, v: string) bool

Description

Insert other string into str at index and return true when string was inserted.

Note

The input str can be reallocated when index is equal to input string len and more space is needed.

Note

Function does nothing (return false) when v string is empty.

Arguments

  • str Valid pointer to input string.

  • index Position in the string, could be equal to input string len.

  • v String to be inserted.

Result

Returns true when string was inserted.

Declared in: string.bl