I meant if you have already tried to implement it, and if there has been a specific problem.
Generally, look at the sf::Text and sf::Glyph classes. With them, you can find out the width of single characters. By comparing the character position with the mouse position, you know where the caret is placed. It requires some thinking, but it shouldn't be extremely difficult.