#!/bin/bash
#########################################################
#                                                       #
# This is BashStyle-NG                                  #
#                                                       #
# Licensed under GNU GENERAL PUBLIC LICENSE v3          #
#                                                       #
# Copyright Christopher Roy Bratušek                    #
#                                                       #
#########################################################

. gettext.sh
export TEXTDOMAIN="bashstyle-rc"

opt="${1}"
shift

case "${opt}" in
    -w | -W )
        result=""
        for arg in "${@,,}"; do
            result+="${arg^} "
        done
        printf '%s\n' "${result% }"
    ;;

    -c | -C )
        result=""
        for word in "${@,,}"; do
            result+="${word^}"
        done
        printf '%s\n' "$result"
    ;;

    "" | * )
        bashstyle-help -a "Christopher Roy Bratusek" -e "nano@jpberlin.de" -h "https://www.nanolx.org/"\
            -l "GNU GPL v3" -n "camelcase" -s $"camelcase transform string"\
            -v "${BSNG_VERSION}" -y "${BSNG_YEAR}"\
            -o $"-w:test_string-a b|uppercase string elements (Test String A B)"\
            -o $"-c:test_string-a b|camelcase string (TestStringAB)"
    ;;
esac
