MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / strip_fqn_prefix

Function strip_fqn_prefix

src/util.rs:425–427  ·  view source on GitHub ↗

Strip the leading fully-qualified-name backslash from a PHP name. `"\\Foo\\Bar"` -> `"Foo\\Bar"`, `"Foo"` -> `"Foo"`.

(name: &str)

Source from the content-addressed store, hash-verified

423///
424/// `"\\Foo\\Bar"` -> `"Foo\\Bar"`, `"Foo"` -> `"Foo"`.
425pub(crate) fn strip_fqn_prefix(name: &str) -> &str {
426 name.strip_prefix('\\').unwrap_or(name)
427}
428
429/// Remove surrounding single or double quotes from a PHP string literal.
430///

Calls

no outgoing calls

Tested by

no test coverage detected