The ldchar() function copies a fixed-length string into a null-terminated string and removes any trailing blanks.
This sample program is in the ldchar.ec file in the demo directory.