str starts-with for strings> str starts-with {flags} (string) ...rest
--ignore-case, -i: search is case insensitivestring: the string to match...rest: For a data structure input, check strings at the given cell paths, and replace with result| input | output |
|---|---|
| list<string> | list<bool> |
| record | record |
| string | bool |
| table | table |
Checks if input string starts with 'my'
>'my_library.rb'|str starts-with'my'
true
Checks if input string starts with 'Car'
>'Cargo.toml'|str starts-with'Car'
true
Checks if input string starts with '.toml'
>'Cargo.toml'|str starts-with'.toml'
false
Checks if input string starts with 'cargo', case-insensitive
>'Cargo.toml'|str starts-with-i'cargo'
true
Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/str_starts-with.html