How can I check what exactly and where a string changed in my textfieldDidChange method?
let str1 = "Hello how are you @Marie, nice day uh?"
So imagine my user decides to edit the text and link markus instead of marie
let str2 = "Hello how are you @ Markus, nice day uh?"
I need a method that detect the change of @ Markus in the text field but doesn't change anything else in the string. I am able to detect last word, first word and so one, but its important to also see what changed within the text
i am thinking about a method that
a = "Hello how are you"
b = newly changed text field
c = ", nice day uh?"
let str3 = a + b + c // More or less
Maybe that I get the index where I am editing at, taking the word out at this index - from left space to right space - and cutting it out? Thanks in advance, yes I am a beginner :P