solidity-stringutils
solidity-stringutils copied to clipboard
Basic string utilities for Solidity
Compare values that are supposed to be zero directly to zero. Otherwise there is a division by zero in sign().
I have a struct like this ``` struct Question { strings.slice question; strings.slice answer; } ``` And a mapping``` mapping(uint256 => QA) public questions;``` and a proposeQuestion function that looks...
In the Read.Me the import is incorrect: import "github.com/Arachnid/solidity-stringutils/strings.sol"; shows an error. If i correct it to : import "github.com/Arachnid/solidity-stringutils/src/strings.sol"; It works but I still get warnings.
``` Compilation warnings encountered: StringUtil.sol:250:5: Warning: This declaration shadows an existing declaration. uint len; ^------^ StringUtil.sol:157:3: The shadowed declaration is here: function len(slice self) internal returns (uint l) { ^...
Hi, Could you please support replace and replace all support ? if you don't have time I can contribute for it. Thanks.
I cannot use the library. Even with your own example: ``` var len = "Unicode snowman ☃".toSlice().len(); ``` The compiler complains: ``` % solc --abi registry.sol registry.sol:26:15: Error: Member "toSlice"...
Hi and tanx to your grate library i have created a file(string.sol) and copy paste the contents into it the file is in the main solidity directory i am importing...
If toString is run on an exactly 32 character slice, memcpy will crash. It took me more hours than I care to admit to find and fix this. Hope this...
I try to import it like in the Readme ``` import "github.com/Arachnid/solidity-stringutils/strings.sol"; contract Mortal { ... ``` But when I try to build it with `truffle` I get this: ```...
when I compile the smart contract it throws this error : Unable to import "undefined": Not Found* this is my smart contract: ``` pragma solidity ^0.4.0; import "github.com/Arachnid/solidity-stringutils/strings.sol"; contract Ballot...