Parse : Remove redundant checks.
This commit is contained in:
parent
d1774fa6cb
commit
f5343fb8cb
|
@ -17,12 +17,6 @@ function parse_pascal() {
|
||||||
local parts=($(_get_parts ${*}))
|
local parts=($(_get_parts ${*}))
|
||||||
local result
|
local result
|
||||||
|
|
||||||
# If already in Pascal.
|
|
||||||
if [[ "${#parts[@]}" = 1 ]]; then
|
|
||||||
echo "${parts[*]^}"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
for part in "${parts[@]}"; do
|
for part in "${parts[@]}"; do
|
||||||
local word="${part,,}"
|
local word="${part,,}"
|
||||||
word="${word^}"
|
word="${word^}"
|
||||||
|
@ -69,12 +63,6 @@ function parse_camel() {
|
||||||
local parts=($(_get_parts ${*}))
|
local parts=($(_get_parts ${*}))
|
||||||
local result
|
local result
|
||||||
|
|
||||||
# If already in camel.
|
|
||||||
if [[ "${#parts[@]}" = 1 ]]; then
|
|
||||||
echo "${parts[*],}"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
for part in "${parts[@]}"; do
|
for part in "${parts[@]}"; do
|
||||||
local word="${part,,}"
|
local word="${part,,}"
|
||||||
word="${word^}"
|
word="${word^}"
|
||||||
|
|
Reference in a new issue