21549/string-concatenation-in-solidity
how do i concatenate strings in solidity?
var str = 'asdf' var b = str + 'sdf'
seems not to work..
I looked up the documentation (https://github.com/ethereum/wiki/wiki/Solidity-Tutorial#elementary-types-value-types) and there is not much mentioned about string concatenation. But it is stated that it works with the dot ('.') ?
"[...] a mapping key k is located at sha3(k . p) where . is concatenation."
A library can be used, for example:
import "github.com/Arachnid/solidity-stringutils/strings.sol"; contract C { using strings for *; string public s; function foo(string s1, string s2) { s = s1.toSlice().concat(s2.toSlice()); } }
Look at the following code : function uintToString(uint ...READ MORE
There is no built-in method/function for this ...READ MORE
If() and require() have separate functions and ...READ MORE
msg.sender(address) function indicated the sender of the ...READ MORE
This was a bug. They've fixed it. ...READ MORE
Just remove the json_encode call, and it should work: $resp ...READ MORE
Summary: Both should provide similar reliability of ...READ MORE
You can get error because solidity does ...READ MORE
You can use btoa() and atob(). btoa() is like base64_encode() and atob() like base64_decode(). Here is an example: btoa('Some ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.