Jump to content

sidenius

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

sidenius's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Yes that would work to some extent, however if we consider the following two scenaries: He was very happy about life. (string one where happy is formatted) All of the people hated him. He was very happy about life (altered string or array, still having formatted the word happy). In this case wouldn't diff tell me that everything has changed? Herebu the formatting is lost. Or if the word happy is found more than once?
  2. Hello I've been struggling with the following problem for a while and I'm ob the verge of giving up! I have a textarea in which a user enters some text. Each word in the string entered can be formatted by the user. This is simple enough and the formatted string along with an undormatted string is stored in a db. However when a user whishes to edit the text at a later point in time I need to know which words in the string has been deleted or changed (in order to keep the formatting of the words not deleted or changed). So my question is whether you guys know if it is possible to compare the original string entered with the edited one - letting me know what (which words) has been changed? An example string: He was very happy. The user has formatted the words was and very. So an areay would be Arr[0] = He Arr[1] = was Arr[1][0] = formatted Arr[2] = very Arr[2][0] = formatted Arr[3] = happy Now if I cange the string to He was happy with life I need the new array to be Arr[0] = He Arr[1] = was Arr[1][0] = formatted Arr[2] = with Arr[3] = life Can this be done? Do you know of any algorithms or functions which can achieve this? Cheers
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.