:unittest.toCamelCase

Test cases for the :toCamelCase function

Description: call:unittest.toCamelCase
Dependencies: :toCamelCase, :Format
Script:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
:unittest.toCamelCase
:$created 20080219 :$changed 20080219
:$source https://www.dostips.com
for %%C in (
        "this is a camel case test"
        " this is a camel case test "
        "tHIs is a cAMEL CASE tesT"
        "123 camel case test"
        "camel case test 123"
        "ThisIsACamelCaseTest"
        ""
    ) do (
    set "s=%%~C"
    call:toCamelCase s
    call:Format "[35] [35]." "'%%~C'" "'%%s%%'"
)
EXIT /b
Script Output:
 DOS Script Output
---- :unittest.toCamelCase - output
'this is a camel case test'         'ThisIsACamelCaseTest'             .
' this is a camel case test '       'ThisIsACamelCaseTest'             .
'tHIs is a cAMEL CASE tesT'         'ThisIsACamelCaseTest'             .
'123 camel case test'               '123CamelCaseTest'                 .
'camel case test 123'               'CamelCaseTest123'                 .
'ThisIsACamelCaseTest'              'Thisisacamelcasetest'             .
''                                  ''                                 .
----