How to write a string in eeprom ?

You could do something like, find the length of the string, use the first byte or two to store the length. Then when reading back, you read the first two bytes, now you know the length of string buffer to create. Read in your string bytes and you're done.