How to operate String, such as do ‘add’, storage
my simple code is below:
contract;
abi StoreString {
#[storage(read)]
fn name() → String;
}
use std::string::String;
configurable {
word1: str[8] = __to_str_array(“MyAsset1”),
word2: str[7] = __to_str_array(“MyAsset”),
}
impl StoreString for Contract {
#[storage(read)]
fn name() → String {
String::from_ascii_str(from_str_array(word1))
}
}
if I want to add word1 and word2 then return, what should I do?
If I want to storage String, then return, what should I do?