I would like to know how to get a variable length string as an input for a function in a contract. I have a StorageString that can store the string. Below is my sample code.
#[storage(read, write)]
fn set_name(n: String) {
storage.name.write_slice(n);
}
#[storage(read)]
fn get_name() -> String {
return storage.name.read_slice().unwrap();
}