This is a good question.
字了一
should be understood as:
(and his) 字
(is) 了一
Thousands years ago, many people in China have a special name besides their first name and last name though nowadays most of Chinese don't have one. And this special name is often described after '字'. For example: 刘备,字玄德
.
According to some reference in Chinese, 字 sometimes can be changed. For example, 关羽
was using 长生
as his 字 but then changed to 云长
(which is mostly known by all Chinese)
字 can be given by a person himself/herself or his/her friends, mentors. While ordinary names were mostly given by the parents.