module

Bindgen::Util::Prefix

String prefix utilities

Class methods

common(strings : Enumerable(String)) : Int32

Finds the common prefix length of strings, if any. Returns 0 if the list is empty, or has only one element. The returned prefix is always at least one character shorter than the shortest string: Given [ "Foo", "FooBar" ], the returned prefix length is 2 (Fo).

Source