Answers for "how to find a character in a string"

2

java Finding a Character in a String

String txt = "Please locate where 'locate' occurs!";
System.out.println(txt.indexOf("locate")); // Outputs 7
Posted by: Guest on October-15-2021
0

finding characters in string

#include <stdio.h>
#include <string.h>
int main()
{
     char mystr[30] = "I’m an example of function strchr";
     printf ("%s", strchr(mystr, 'f'));
     return 0;
}
Posted by: Guest on December-29-2021

Code answers related to "how to find a character in a string"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language