Questions tagged [string]
The string tag has no usage guidance.
9
questions
3
votes
1
answer
187
views
how to implement a 48-char-long symbol token with balances like "10.0000 custom.name.of.the.token"?
I need to create my.token smart contract on EOS that will be exactly the same as eosio.token contract but my.token's symbol_code will allow a much bigger string. Something like 50 character long ...
3
votes
1
answer
624
views
How do I create a Multi-Index DB secondary index from a String?
I'm developing a Smart Contract for EOSIO. I have a Multi-Index table with a uint64_t primary key. I'd like to add a secondary index to the table.
Ideally the data I'd be indexing on would be a std::...
2
votes
1
answer
143
views
Stored vector of strings in table implicitly converting to vector of unsigned char, why?
I'm trying to store an object in a multi-index table with one of the members a vector of std::string. When retrieving the data however it comes back as a vector of unsigned char, and I can't do ...
1
vote
3
answers
302
views
Cannot read string data from table row. But when I put "" data, it works
//@abi action
void testhand() {
gamecurrents gamecurrenttable(_self, _self);
auto existing = gamecurrenttable.find( _self );
if(existing == gamecurrenttable.end()) {
...
1
vote
0
answers
66
views
Why can eosiocpp not do normal operations on std::vector<std::string>?
I have two types:
struct typeA {
std::vector<std::string> vec;
}
struct typeB {
std::vector<std::string> vec;
}
but I can't seem to get the 2 vecs to mix as eosiocpp seems to be ...
1
vote
1
answer
66
views
variables which type is account_name is shown as integer since Dawn4.1, while it is string in Dawn4.0
Also if my action have an account_name param, it will ask for an integer too.
Is it right?
The following is what I post in telegram channel.
Hi guys, my table's account field is shown/passed as an ...
0
votes
1
answer
1k
views
no member named 'print' in 'std::__1::basic_string<char>'
if I declare a string and attempt to print it like this:
std::string s;
eosio::print(s);
the EOS compiler pukes:
In file included from t.cpp:1: In file included from ./t.hpp:4: In
file included ...
0
votes
1
answer
269
views
Can we typecast string to use it as a id in table?
I need to use a string as a id of table in my smart contract. Initially i found some answers that string can't be use as primary key. But i use string as a key in table as given below:
//@abi table ...
0
votes
1
answer
285
views
How can i convert a time_point to a string?
I want to convert a time_point variable to a string using eos studio. I need to insert a time_point variable in a string in order to creare the object of my smart contract.