Upper vs Lower Case

Converting to either upper case or lower case in order to do case-insensitive comparisons is incorrect due to “interesting” features of some cultures, particularly Turkey. Instead, use a StringComparer with the appropriate options. MSDN has some great guidelines on string handling. You might also want to check that your code passes the Turkey test. EDIT: … Read more

Extract substring in Bash

You can use Parameter Expansion to do this. If a is constant, the following parameter expansion performs substring extraction: b=${a:12:5} where 12 is the offset (zero-based) and 5 is the length If the underscores around the digits are the only ones in the input, you can strip off the prefix and suffix (respectively) in two … Read more

“The argument type ‘String?’ can’t be assigned to the parameter type ‘String'” when using stdin.readLineSync()

Welcome to Dart. What you are experience is the new null-safety feature (introduced with Dart 2.12.0) where variables by default cannot contain the value null. This is statically checked so you will get an error even before your program are executed. In your example the problem is the following line: var input = stdin.readLineSync(); If … Read more