first

Returns the first $n characters of the string.

Description

static first(int $n)

Parameters

  • int $n
    Number of characters to retrieve from the start.

Return Value

static
String being the first $n chars.