Project

General

Profile

« Previous | Next » 

Revision 10889

lib/sh/util.sh: added rm_prefix()

View differences:

util.sh
239 239
match_prefix() # usage: match_prefix pattern str
240 240
{ if starts_with "$1" "$2"; then echo "${2%${2#$1}}"; fi }
241 241

  
242
rm_prefix() { echo "${2#$1}"; } # usage: rm_prefix pattern str
243

  
242 244
repeat() # usage: str=... n=... repeat
243 245
{
244 246
	: "${str?}" "${n:?}"; local result= n="$n" # n will be modified in function

Also available in: Unified diff