Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR LUA

C# check if a string contains only a particular character

// This is to check if a string contains only the question mark "?".

string input = "???";
bool isAllQuestion = input.All(c => c=='?');
Console.WriteLine(isAllQuestion);
Console.ReadLine();

// output: True
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #string #character
ADD COMMENT
Topic
Name
6+7 =