Arachnid / solidity-stringutils

Basic string utilities for Solidity
Apache License 2.0
1.12k stars 369 forks source link

1 array element missed #11

Closed Dexaran closed 7 years ago

Dexaran commented 7 years ago

In this example var s = "www.google.com".toSlice(); var delim = ".".toSlice(); var parts = new string[](s.count(delim) + 1);

parts should contain three elements www / google / com but there are only two dots in www.google.com string. (count + 1) is required instead of (count) if we want all three parts of the string to be in parts array.

Arachnid commented 7 years ago

Thanks!