I have a library which has the following function:

function strConcat(
    string memory _a,
    string memory _b
    internal pure
    returns (string memory)

My contract implements the library and uses the following:

using StringConverter for *;
uint minLevel = getStorageUint(

This is working, but if I change:

using StringConverter for string;

I can see the error:

TypeError: Member "strConcat" not found or not visible after argument-dependent lookup in literal_string "_conf_".

What can I type at using to make it working correctly?

  • Can you try with for bytes32
    – cqx
    Sep 3, 2019 at 18:38
  • Just tried, unfortunately, no effect, same error.
    – Radek_pl
    Sep 3, 2019 at 18:40
  • Can you link the library you are using?
    – cqx
    Sep 3, 2019 at 18:45
  • Sure, but library is working perfectly, the problem is with using. Took it from here: ethereum.stackexchange.com/questions/729/… It's kinda outdated, so you have to change string to string memory everywhere and i to uint i in loops (just tested on remix).
    – Radek_pl
    Sep 3, 2019 at 18:49

1 Answer 1


Try this solution:

First declare string variable:

string memory myVariable = "_conf_";

Then execute the concat.


I hope this works.

The problem you have comes arises, because


doesn't explicitly create "_conf_" as a memory string.

  • 1
    This solves the problem but, to be honest, it's an ugly solution and probably more gas expensive. There must be a better way... Btw. It's not me who gave you minus.
    – Radek_pl
    Sep 3, 2019 at 19:01
  • 1
    Good to know. I update my answer. Maybe you try with this one: using StringConverter for bytes;
    – cqx
    Sep 3, 2019 at 19:04
  • 1
    Bytes didn't help either. :( I'm wondering what type does represent syntax ("anything"). It says it's literal_string but there isn't so much to read about it in solidity documentation, also can't put that at "using".
    – Radek_pl
    Sep 3, 2019 at 19:09
  • 1
    If you are just after keeping gas at a minimum you are best off sticking with for *. In my opinion it doesn't hurt that much.
    – cqx
    Sep 3, 2019 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.