Hello,
I have two cases here with Strcomp function and I'll need your help.
When I compare two strings using the above function, I get values as 0, 1, -1.
1) My first case is for the 0 values. I can normally get this even if I have two strings which ones is lower case and the other proper case.
For example,
Firstname OldFirstName Compare_Fields
Jack jack 0
Peter peter 0
Anna-Maria anna-maria 0
Thomas Thomas 0
Steven Steven 0
Clearly, the first 3 cases have been modified but the comparison is based on characters. However, I'll need to check the proper casing part (just like I can test it using the exact function in Excel)
So, for my testing/checking purposes, I'd like to compare even such case sensitive situations. Is there any way?
2) The other case is that, for the values 1 and -1, I'd like to see what character(s) was(were) changed. So, I'd like to apply a function that can give me which character(s) have been added (or removed).
For example,
Firstname OldFirstName Type_of_Change
Jack P jack P
Peter J peter J
Anna-Maria anna maria -
Thomas Thoms a
Lucy Luc_d y
Bruce B ruce
Steven Stvn ee
Is there any way that I can do it?
What I am trying to see is the type of corrections that I made to some strings and revise if necessary.
Thanks in advance!
I have two cases here with Strcomp function and I'll need your help.
When I compare two strings using the above function, I get values as 0, 1, -1.
1) My first case is for the 0 values. I can normally get this even if I have two strings which ones is lower case and the other proper case.
For example,
Firstname OldFirstName Compare_Fields
Jack jack 0
Peter peter 0
Anna-Maria anna-maria 0
Thomas Thomas 0
Steven Steven 0
Clearly, the first 3 cases have been modified but the comparison is based on characters. However, I'll need to check the proper casing part (just like I can test it using the exact function in Excel)
So, for my testing/checking purposes, I'd like to compare even such case sensitive situations. Is there any way?
2) The other case is that, for the values 1 and -1, I'd like to see what character(s) was(were) changed. So, I'd like to apply a function that can give me which character(s) have been added (or removed).
For example,
Firstname OldFirstName Type_of_Change
Jack P jack P
Peter J peter J
Anna-Maria anna maria -
Thomas Thoms a
Lucy Luc_d y
Bruce B ruce
Steven Stvn ee
Is there any way that I can do it?
What I am trying to see is the type of corrections that I made to some strings and revise if necessary.
Thanks in advance!