Small performance tweak -- replace a call to expr.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42941 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
6db5b8c639
commit
e2932f63b0
@ -339,7 +339,7 @@ function ContainsSubstring()
|
||||
local string="$1"
|
||||
local substring="$2"
|
||||
local newString=${string/${substring}/''}
|
||||
if [ ${#string} -eq `expr ${#newString} + ${#substring}` ] ; then
|
||||
if [ ${#string} -eq $((${#newString} + ${#substring})) ] ; then
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
|
Loading…
Reference in New Issue
Block a user