which of the following string methods can be used to determine if a string contains only ‘\n’ characters?
Code Example - which of the following string methods can be used to determine if a string contains only ‘\n’ characters?
bool ConsistsOnly(string input, char wanted){
input = input.Trim();
foreach(char current in input){
if(current != wanted){
return false;
}
}
return true;
}