Option to set Cursor at specific character globally not per lin?

I would like to set the cursor to a specific position but i only have the number of the character from the beginning of a huge text string with \n so it get displayed as file in the editor.

is there something like that or do i have to seperately calculate the line and character position in that line?

Ah wow, just now i found the “posfromIndex” function…