mirror of
https://github.com/nushell/nushell.git
synced 2025-08-12 20:08:11 +02:00
Auto-generate markdown command docs (#4451)
* Finish updating * a couple improvements * Update renames * cleanup examples
This commit is contained in:
44
docs/commands/str_substring.md
Normal file
44
docs/commands/str_substring.md
Normal file
@ -0,0 +1,44 @@
|
||||
---
|
||||
title: str substring
|
||||
layout: command
|
||||
version: 0.59.0
|
||||
---
|
||||
|
||||
substrings text
|
||||
|
||||
## Signature
|
||||
|
||||
```> str substring (range) ...rest```
|
||||
|
||||
## Parameters
|
||||
|
||||
- `range`: the indexes to substring [start end]
|
||||
- `...rest`: optionally substring text by column paths
|
||||
|
||||
## Examples
|
||||
|
||||
Get a substring from the text
|
||||
```shell
|
||||
> 'good nushell' | str substring [5 12]
|
||||
```
|
||||
|
||||
Alternatively, you can use the form
|
||||
```shell
|
||||
> 'good nushell' | str substring '5,12'
|
||||
```
|
||||
|
||||
Drop the last `n` characters from the string
|
||||
```shell
|
||||
> 'good nushell' | str substring ',-5'
|
||||
```
|
||||
|
||||
Get the remaining characters from a starting index
|
||||
```shell
|
||||
> 'good nushell' | str substring '5,'
|
||||
```
|
||||
|
||||
Get the characters from the beginning until ending index
|
||||
```shell
|
||||
> 'good nushell' | str substring ',7'
|
||||
```
|
||||
|
Reference in New Issue
Block a user