Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# check if string contains character multiple times

string s = "tytyt";

var firstIndex = s.IndexOf("tyt");

var result = firstIndex != s.LastIndexOf("tyt") && firstIndex != -1;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #string #character #multiple #times
ADD COMMENT
Topic
Name
1+7 =