String matching C#
I have a problem ..
i have a string
public string str; public string find; void Start() { str = "wattesboxblspoiifa" find = "box"; }
void Update() { find = str; }
I wanna search the box in str :) please help me
Comment
Answer by Landern · Oct 29, 2016 at 06:02 AM
bool inString = str.Contains(find, StringComparison.Ordinal);
use OrdinalIgnoreCase instead if you dont care about case sensitive strings.
Your answer
![](https://koobas.hobune.stream/wayback/20220612095627im_/https://answers.unity.com/themes/thub/images/avi.jpg)