Added nn_set_str and test code.