mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-01 10:11:14 -03:00
We no longer have two doc systems, move sphinx_doc_src back to doc_src
This commit is contained in:
39
doc_src/cmds/string-length.rst
Normal file
39
doc_src/cmds/string-length.rst
Normal file
@@ -0,0 +1,39 @@
|
||||
string-length - print string lengths
|
||||
====================================
|
||||
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
.. BEGIN SYNOPSIS
|
||||
|
||||
::
|
||||
|
||||
string length [(-q | --quiet)] [STRING...]
|
||||
|
||||
.. END SYNOPSIS
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. BEGIN DESCRIPTION
|
||||
|
||||
``string length`` reports the length of each string argument in characters. Exit status: 0 if at least one non-empty STRING was given, or 1 otherwise.
|
||||
|
||||
.. END DESCRIPTION
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. BEGIN EXAMPLES
|
||||
|
||||
::
|
||||
|
||||
>_ string length 'hello, world'
|
||||
12
|
||||
|
||||
>_ set str foo
|
||||
>_ string length -q $str; echo $status
|
||||
0
|
||||
# Equivalent to test -n $str
|
||||
|
||||
.. END EXAMPLES
|
||||
Reference in New Issue
Block a user