mirror of
https://github.com/nushell/nushell
synced 2024-12-27 05:23:11 +00:00
improve str substring (#5730)
This commit is contained in:
parent
64efa30f3e
commit
8318d59ef1
1 changed files with 2 additions and 2 deletions
|
@ -45,7 +45,7 @@ impl Command for SubCommand {
|
|||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
"Get part of a string"
|
||||
"Get part of a string. Note that the start is included but the end is excluded, and that the first character of a string is index 0."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
|
@ -65,7 +65,7 @@ impl Command for SubCommand {
|
|||
fn examples(&self) -> Vec<Example> {
|
||||
vec![
|
||||
Example {
|
||||
description: "Get a substring from the text",
|
||||
description: "Get a substring \"nushell\" from the text \"good nushell\"",
|
||||
example: " 'good nushell' | str substring [5 12]",
|
||||
result: Some(Value::test_string("nushell")),
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue