solidity-stringutils
solidity-stringutils copied to clipboard
Basic string utilities for Solidity
Something along the lines of: ``` function uintToString(uint v) constant returns (string str) { uint maxlength = 100; bytes memory reversed = new bytes(maxlength); uint i = 0; while (v...
Does the library support solidity version 0.5.x? I am getting this error "Source file requires different compiler version" for solc version 0.5.4
How would concatenate three strings? var 2 = "abc".toSlice().concat("def".toSlice().concat("ghi".toSlice())); What am I missing?
github.com/Arachnid/solidity-stringutils/src/strings.sol:705:13: DeclarationError: Undeclared identifier. for(i = 0; i < parts.length; i++) { ^
This line should be "if(shortest - idx < 32){" otherwise we don't mask out the bits of the shortest string which aren't part of the string. Eg if we have...
Could you please publish this to ethpm so it can be more easily integrated into projects? Thanks!
remix is complaining that no solidity minimum version is supplied, can you please add?
Nearly all of the string utility functions can be declared as view or even pure, since they do not modify any state but only meddle with the arguments passed to...
The stringutils library is using the Apache2 license. Under that license it says this, > 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof...
...so that something like the following will work: address foo = 0xe30b378de3b6a93cf1c26365f9280f5350bdcbfe; string bar = "hello world! ".toSlice().concat(foo.toSlice()); Answer #5 in https://ethereum.stackexchange.com/questions/8346/convert-address-to-string/8347 is an implementation of address.toString()