Module pe4kin_util

Utility functions.

Copyright © (C) 2016, Sergey Prokhorov

Authors: Sergey Prokhorov (me@seriyps.ru).

Description

Utility functions

Function Index

slice/2
slice/3like binary:part/3 but Offset and Size in UTF-8 codepoints, not bytes.
slice_pos/2
slice_pos/3convert utf-8 Offset and Size to byte offset and size.
strip/1
strip/2
strlen/1
to_binary/1
to_lower/1lowercase ASCII binary.

Function Details

slice/2

slice(Utf8, Size) -> any()

slice/3

slice(Utf8, Offset, Size) -> any()

like binary:part/3 but Offset and Size in UTF-8 codepoints, not bytes

slice_pos/2

slice_pos(Utf8::<<_:8>>, Size::non_neg_integer()) -> non_neg_integer()

slice_pos/3

slice_pos(Utf8::<<_:8>>, Offset::non_neg_integer(), Size::non_neg_integer()) -> {ByteOffset::non_neg_integer(), ByteSize::non_neg_integer()}

convert utf-8 Offset and Size to byte offset and size

strip/1

strip(Bin) -> any()

strip/2

strip(Bin, X2) -> any()

strlen/1

strlen(Utf8) -> any()

to_binary/1

to_binary(Atom) -> any()

to_lower/1

to_lower(Bin) -> any()

lowercase ASCII binary


Generated by EDoc