Byte_Search module

count

procedureextensionSource

How many times byte occurs in the text.

Example↗
Byte_Search :: #import "Extensions/Byte_Search";

assert(Byte_Search.count("a\nb\nc", #char "\n") == 2);
count :: (text: string, byte: u8) -> int

Parameters

text: string
byte: u8

Returns

int

See also