Strings library (#1746)

* Feature Issue #1745

* Feature Issue #1745 remove whitespace in contract

* Feature Issue #1745 fix Solidity linter issues

* Feature Issue #1745 fix JS lint issues

* Update contracts/drafts/Strings.sol

Co-Authored-By: Nicolás Venturo <nicolas.venturo@gmail.com>

* Update contracts/drafts/Strings.sol

Co-Authored-By: Nicolás Venturo <nicolas.venturo@gmail.com>

* Update contracts/drafts/Strings.sol

Co-Authored-By: Nicolás Venturo <nicolas.venturo@gmail.com>

* Updates based on PR feedback

* Remove trailing whitespace

* Update tests based on @nventuro feedback

* Removed return name

* Rename length as suggested

* Rename temp variables in uint256ToString

* Renamed bytes variable to buffer

* Change concatenate to use abi.encodePacked

* Moved OraclizeAPI reference to unit256ToString

* Add emoji concat test

* Remove concatenate

* Remove concatenate from StringsMock and test

* Rename function to fromUint256

* Update StringsMock.sol
This commit is contained in:
Andrew B Coathup
2019-05-28 02:31:09 +10:00
committed by Nicolás Venturo
parent a83f680a63
commit fbbff53528
3 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,9 @@
pragma solidity ^0.5.0;
import "../drafts/Strings.sol";
contract StringsMock {
function fromUint256(uint256 value) public pure returns (string memory) {
return Strings.fromUint256(value);
}
}