Revision 9653
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/sh/util.sh | ||
---|---|---|
170 | 170 |
|
171 | 171 |
#### strings |
172 | 172 |
|
173 |
starts_with() { test "${2#$1}" != "$2"; } # usage: starts_with pattern str |
|
174 |
|
|
173 | 175 |
repeat() # usage: str=... n=... repeat |
174 | 176 |
{ |
175 | 177 |
: "${str?}" "${n:?}"; local result= n="$n" # n will be modified in function |
Also available in: Unified diff
lib/sh/util.sh: added starts_with()