various small documentation improvements (#18602)

This commit is contained in:
Miran 2021-07-28 14:31:13 +02:00 • committed by GitHub
commit e616675c41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 123 additions and 97 deletions

View file

@ -48,27 +48,27 @@ Proc Usage
Seqs
----
============================================== ==========================================
Proc Usage
============================================== ==========================================
`newSeq<#newSeq>`_ Create a new sequence of a given length
`newSeqOfCap<#newSeqOfCap,Natural>`_ Create a new sequence with zero length
and a given capacity
`setLen<#setLen,seq[T],Natural>`_ Set the length of a sequence
`len<#len,seq[T]>`_ Return the length of a sequence
`@<#@,openArray[T]>`_ Turn an array into a sequence
`add<#add,seq[T],sinkT>`_ Add an item to the sequence
`insert<#insert,seq[T],sinkT>`_ Insert an item at a specific position
`delete<#delete,seq[T],Natural>`_ Delete an item while preserving the
order of elements (`O(n)` operation)
`del<#del,seq[T],Natural>`_ `O(1)` removal, doesn't preserve the order
`pop<#pop,seq[T]>`_ Remove and return last item of a sequence
`x & y<#&,seq[T],seq[T]>`_ Concatenate two sequences
`x[a .. b]<#[],openArray[T],HSlice[U,V]>`_ Slice of a sequence (both ends included)
`x[a .. ^b]<#[],openArray[T],HSlice[U,V]>`_ Slice of a sequence but `b` is a
reversed index (both ends included)
`x[a ..\< b]<#[],openArray[T],HSlice[U,V]>`_ Slice of a sequence (excluded upper bound)
============================================== ==========================================
============================================================= ==========================================
Proc Usage
============================================================= ==========================================
`newSeq<#newSeq>`_ Create a new sequence of a given length
`newSeqOfCap<#newSeqOfCap,Natural>`_ Create a new sequence with zero length
and a given capacity
`setLen<#setLen,seq[T],Natural>`_ Set the length of a sequence
`len<#len,seq[T]>`_ Return the length of a sequence
`@<#@,openArray[T]>`_ Turn an array into a sequence
`add<#add,seq[T],sinkT>`_ Add an item to the sequence
`insert<#insert,seq[T],sinkT>`_ Insert an item at a specific position
`delete<#delete,seq[T],Natural>`_ Delete an item while preserving the
order of elements (`O(n)` operation)
`del<#del,seq[T],Natural>`_ `O(1)` removal, doesn't preserve the order
`pop<#pop,seq[T]>`_ Remove and return last item of a sequence
`x & y<#&,seq[T],seq[T]>`_ Concatenate two sequences
`x[a .. b]<#[],openArray[T],HSlice[U: Ordinal,V: Ordinal]>`_ Slice of a sequence (both ends included)
`x[a .. ^b]<#[],openArray[T],HSlice[U: Ordinal,V: Ordinal]>`_ Slice of a sequence but `b` is a
reversed index (both ends included)
`x[a ..< b]<#[],openArray[T],HSlice[U: Ordinal,V: Ordinal]>`_ Slice of a sequence (excluded upper bound)
============================================================= ==========================================
**See also:**
* `sequtils module <sequtils.html>`_ for operations on container