Arachnid / solidity-stringutils

Basic string utilities for Solidity
Apache License 2.0
1.13k stars 372 forks source link

Unable to get "join" working #10

Closed nrchandan closed 7 years ago

nrchandan commented 7 years ago

Getting the following error.

Error: Invalid type for argument in function call. Invalid implicit conversion from struct strings.slice memory[2] memory to struct strings.slice memory[] memory requested.
                var book = ";".toSlice().join([catalog[i].title.toSlice(), catalog[i].publisher.toSlice()]);
                                              ^----------------------------------------------------------^
nrchandan commented 7 years ago

You can see the complete code here: https://review.gerrithub.io/#/c/357265/1/contracts/LMS.sol,unified@119

nrchandan commented 7 years ago

Got it working after seeing the example in the unit test at https://github.com/Arachnid/solidity-stringutils/blob/master/strings_test.sol