Fix SC2295
This commit is contained in:
parent
d24d08b1df
commit
271b7227b4
2
snippy
2
snippy
@ -132,7 +132,7 @@ is_vim() {
|
|||||||
|
|
||||||
# Find the index of a string in a string
|
# Find the index of a string in a string
|
||||||
strindex() {
|
strindex() {
|
||||||
x="${1%%$2*}"
|
x="${1%%"$2"*}"
|
||||||
[[ "$x" = "$1" ]] && echo -1 || echo "${#x}"
|
[[ "$x" = "$1" ]] && echo -1 || echo "${#x}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user