Create a function that takes a string and returns that string with the first half lowercased and the last half uppercased.
Example:
foobar => fooBAR
If the string length is an odd number then 'round' it up to find which letters to uppercase. See example below.
sillycase("brian")
// --^-- midpoint
// bri first half (lower-cased)
// AN second half (upper-cased)
I thought PHP was gonna be a tough one, so, not looking at other comments, the best I came up with was...
Language: PHP
Length: 98
Solution:
...and...
Language: PHP
Length: 124
Solution: though there is a nice quiet bug in this :)
...and...
Language: PHP
Length: 130
Solution:
...and...
Language: PHP
Length: 139
Solution: