Parse : Remove redundant checks.

This commit is contained in:
Dmitry Voronin 2023-12-27 15:44:28 +03:00
parent d1774fa6cb
commit f5343fb8cb

View file

@ -17,12 +17,6 @@ function parse_pascal() {
local parts=($(_get_parts ${*}))
local result
# If already in Pascal.
if [[ "${#parts[@]}" = 1 ]]; then
echo "${parts[*]^}"
return 0
fi
for part in "${parts[@]}"; do
local word="${part,,}"
word="${word^}"
@ -69,12 +63,6 @@ function parse_camel() {
local parts=($(_get_parts ${*}))
local result
# If already in camel.
if [[ "${#parts[@]}" = 1 ]]; then
echo "${parts[*],}"
return 0
fi
for part in "${parts[@]}"; do
local word="${part,,}"
word="${word^}"