How to check/filter uppercase words alone from a string using C#? I don't want to use "Char.IsUpper()" by looping through each letter of a word for checking Upper case for the same. Is there any way very simple code to accomplish this task? with LINQ etc.?
What about this?
string test = "This IS a STRING";
var upperCaseWords = test.Split(' ').Where( w => w == w.ToUpper());
upperCaseWords now contain all upper case words in the string.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With