1
0
mirror of https://github.com/nushell/nushell.git synced 2025-07-14 13:25:47 +02:00
Files
nushell/docs/commands/str_substring.md
Justin Ma c0a1d18e3d update , regenerate commands' docs and update make_docs script ()
* feat: update , regenerate commands' docs

* chore: update make_docs script
2022-02-21 11:26:00 -06:00

756 B

title, layout, version
title layout version
str substring command 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

>  'good nushell' | str substring [5 12]

Alternatively, you can use the form

>  'good nushell' | str substring '5,12'

Drop the last n characters from the string

>  'good nushell' | str substring ',-5'

Get the remaining characters from a starting index

>  'good nushell' | str substring '5,'

Get the characters from the beginning until ending index

>  'good nushell' | str substring ',7'