cpt

Carbs Packaging Tools
git clone git://git.carbslinux.org/cpt
Log | Files | Refs | README | LICENSE

commit e67f0fba78a17f73e9bda3f5a2f7ba011f35c46c
parent 2e42e8719e9c4133ce8c18304a9da4410ecd10f9
Author: Cem Keylan <cem@ckyln.com>
Date:   Mon,  4 Jan 2021 13:19:51 +0300

docs: update

Diffstat:
Mdocs/cpt.org | 37+++++++++++++++++++++++++++++--------
1 file changed, 29 insertions(+), 8 deletions(-)

diff --git a/docs/cpt.org b/docs/cpt.org @@ -890,11 +890,11 @@ Following functions are used to manipulate, check, or interact with text. given string. If the string is inside the list, it will return 0, otherwise 1. #+begin_src sh - # Usage - contains "$LIST" foo +# Usage +contains "$LIST" foo - contains "foo bar" foo # Returns 0 - contains "foo bar" baz # Returns 1 +contains "foo bar" foo # Returns 0 +contains "foo bar" baz # Returns 1 #+end_src *** =regesc()= @@ -906,7 +906,7 @@ given string. If the string is inside the list, it will return 0, otherwise 1. in POSIX BRE. Those characters are, =$=, =.=, =*=, =[=, =\\=, and =^=. #+begin_src sh - regesc '^[$\' # Returns \^\[\$\\ +regesc '^[$\' # Returns \^\[\$\\ #+end_src *** =pop()= @@ -918,10 +918,31 @@ in POSIX BRE. Those characters are, =$=, =.=, =*=, =[=, =\\=, and =^=. call. Word splitting is intentional when using this function. #+begin_src sh - # Usage - pop foo from $LIST +# Usage +pop foo from $LIST - pop foo from foo baz bar # Returns baz bar +pop foo from foo baz bar # Returns baz bar +#+end_src + +*** =sepchar()= +:PROPERTIES: +:DESCRIPTION: Separate characters from a string +:END: + +This function can be used to separate characters from the given string without +resorting to external resources. + +#+begin_src sh +sepchar mystring +# Prints: +# m +# y +# s +# t +# r +# i +# n +# g #+end_src ** System Functions