class · System.Bindings

Names

public class System.Bindings.Names : System.Any

Names: prefixes, case, patterns.

Kind
class
Namespace
System.Bindings
Assembly
System.Bindings
Access
public, static, abstract
Source file
Names.ant

Inheritance

Base classes
Any Names

Methods

static method Strip(name: System.String<u8>, prefixes: System.List<System.String<u8>>) -> System.String<u8>
#

static

name without the longest of prefixes it starts with (when something is left).

static method Strip(name: System.String<u8>, prefix: System.String<u8>) -> System.String<u8>
#

static

name without prefix (when it starts with it and something is left).

static method Words(name: System.String<u8>) -> System.List<System.String<u8>>
#

static

The words of a name: split at _, and at lower-to-upper and acronym-to-word boundaries (GPUDevice → GPU, Device).

static method Pascal(name: System.String<u8>) -> System.String<u8>
#

static

name in Pascal case.

static method Camel(name: System.String<u8>) -> System.String<u8>
#

static

name in camel case.

static method Upper(name: System.String<u8>) -> System.String<u8>
#

static

name in UPPER_SNAKE case.

static method Snake(name: System.String<u8>) -> System.String<u8>
#

static

name in snake case.

static method Shape(name: System.String<u8>, shape: System.Bindings.NameCase) -> System.String<u8>
#

static

name in a case.

static method Matches(name: System.String<u8>, pattern: System.String<u8>) -> bool
#

static

Whether name matches pattern: * any text, ? one character, the rest as it is (SDL_INIT_*).

static method CommonPrefix(names: System.List<System.String<u8>>) -> System.String<u8>
#

static

The prefix the names share, up to a _ (SDL_EVENT_QUIT, SDL_EVENT_USER → SDL_EVENT_); one name: up to its last _.

static method Writable(name: System.String<u8>) -> System.String<u8>
#

static

A name that can be written: one that starts with a digit gets a _ before it.

static method Stem(path: System.String<u8>) -> System.String<u8>
#

static

The stem of a header's path, without its folder and extension (include/SDL3/SDL_video.h → SDL_video).

static method IsUpper(c: u8) -> bool
#

static

static method IsLower(c: u8) -> bool
#

static

static method IsDigit(c: u8) -> bool
#

static

static method HasLower(text: System.String<u8>) -> bool
#

static

static method First(word: System.String<u8>, upper: bool) -> System.String<u8>
#

static

The word with its first letter in upper (or lower) case.

static method MatchesFrom(name: System.String<u8>, at: i32, pattern: System.String<u8>, from: i32) -> bool
#

static

Inherited members (5)

Source

Names as Larva HIR, decompiled from its Larva HIR.

System.Bindings.Names.hir
// Names: prefixes, case, patterns.
public class System.Bindings.Names : System.Any
{
    // `name` without the longest of `prefixes` it starts with (when something is left).
    static method Strip(name: System.String<u8>, prefixes: System.List<System.String<u8>>) -> System.String<u8>
    // `name` without `prefix` (when it starts with it and something is left).
    static method Strip(name: System.String<u8>, prefix: System.String<u8>) -> System.String<u8>
    // The words of a name: split at `_`, and at lower-to-upper and acronym-to-word boundaries (`GPUDevice` → GPU, Device).
    static method Words(name: System.String<u8>) -> System.List<System.String<u8>>
    // `name` in `Pascal` case.
    static method Pascal(name: System.String<u8>) -> System.String<u8>
    // `name` in `camel` case.
    static method Camel(name: System.String<u8>) -> System.String<u8>
    // `name` in `UPPER_SNAKE` case.
    static method Upper(name: System.String<u8>) -> System.String<u8>
    // `name` in `snake` case.
    static method Snake(name: System.String<u8>) -> System.String<u8>
    // `name` in a case.
    static method Shape(name: System.String<u8>, shape: System.Bindings.NameCase) -> System.String<u8>
    // Whether `name` matches `pattern`: `*` any text, `?` one character, the rest as it is (`SDL_INIT_*`).
    static method Matches(name: System.String<u8>, pattern: System.String<u8>) -> bool
    // The prefix the names share, up to a `_` (`SDL_EVENT_QUIT`, `SDL_EVENT_USER` → `SDL_EVENT_`); one name: up to its last `_`.
    static method CommonPrefix(names: System.List<System.String<u8>>) -> System.String<u8>
    // A name that can be written: one that starts with a digit gets a `_` before it.
    static method Writable(name: System.String<u8>) -> System.String<u8>
    // The stem of a header's path, without its folder and extension (`include/SDL3/SDL_video.h` → `SDL_video`).
    static method Stem(path: System.String<u8>) -> System.String<u8>
    static method IsUpper(c: u8) -> bool
    static method IsLower(c: u8) -> bool
    static method IsDigit(c: u8) -> bool
    static method HasLower(text: System.String<u8>) -> bool
    // The word with its first letter in upper (or lower) case.
    static method First(word: System.String<u8>, upper: bool) -> System.String<u8>
    static method MatchesFrom(name: System.String<u8>, at: i32, pattern: System.String<u8>, from: i32) -> bool
}
Esc