mirror of
https://github.com/nushell/nushell.git
synced 2024-12-23 23:49:44 +01:00
improve str substring (#5730)
This commit is contained in:
parent
64efa30f3e
commit
8318d59ef1
@ -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 New Issue
Block a user