Skip to content

Lines ​

php
final class KMark\Lines

The lines of a text and the place that is being read.

Source: src/Lines.php

Methods ​

__construct() ​

php
public function __construct(array $lines)

split() ​

php
public static function split(string $text): array

Splits a text into lines: one kind of line break, and the tabs written as the spaces they stand for.

Returns list<string>

eof() ​

php
public function eof(): bool

line() ​

php
public function line(int $ahead = 0): string

The line at a place from here, or an empty string when there is none.

next() ​

php
public function next(): string

peek() ​

php
public function peek(int $ahead = 0): string

skip() ​

php
public function skip(int $count = 1): void

Documentation of 2.0.0 , built from f573e5f on 2.0.0 by pipeline #37507527063 on 2026-10-06.