Hi all!
I have a dataset which has a bunch of wayward spaces randomly and non-uniformly strewn at the beginning and end of string entries. Is there a quick way to eliminate these?
What I have right now is akin to
CURRENT:
Name:
" Tom "
"Billy "
" Gus"
"Lucky Joe "
"Johnny the Navigator"
The string variable I'd LIKE to have is
DESIRED:
Name:
"Tom"
"Billy"
"Gus"
"Lucky Joe"
"Johnny the Navigator"
I assume this one is not too much of a behemoth if you know what you're doing; I'm still relatively new to Stata and string manipulation is a skill I haven't built up in great degree so far. Thanks all for your time!
I have a dataset which has a bunch of wayward spaces randomly and non-uniformly strewn at the beginning and end of string entries. Is there a quick way to eliminate these?
What I have right now is akin to
CURRENT:
Name:
" Tom "
"Billy "
" Gus"
"Lucky Joe "
"Johnny the Navigator"
The string variable I'd LIKE to have is
DESIRED:
Name:
"Tom"
"Billy"
"Gus"
"Lucky Joe"
"Johnny the Navigator"
I assume this one is not too much of a behemoth if you know what you're doing; I'm still relatively new to Stata and string manipulation is a skill I haven't built up in great degree so far. Thanks all for your time!
Comment