mirror of
https://github.com/status-im/github-oracle.git
synced 2026-08-27 09:51:10 +00:00
added toBytes20
This commit is contained in:
@@ -14,6 +14,11 @@ library StringLib {
|
||||
result := mload(add(source, 32))
|
||||
}
|
||||
}
|
||||
function toBytes20(string memory source) constant returns (bytes20 result) {
|
||||
assembly {
|
||||
result := mload(add(source, 20))
|
||||
}
|
||||
}
|
||||
function parseBytes20(string self)
|
||||
constant returns (bytes20 bs) {
|
||||
bytes memory h = bytes(self);
|
||||
|
||||
Reference in New Issue
Block a user