Skip to content

utils/String fromUint256 should probably be toString #2156

Closed
@Arachnid

Description

Supposing we use the common convention of using such utility functions as a library:

contract Foo {
  using Strings for uint256;

  function test() returns(string memory) {
    uint i = 42;
    return i.fromUint256();
  }
}

The function name here tells us nothing - we already knew it was a uint256 from the variable type. toString would be a much more intuitive name, and line up with what other languages use in the same situation.

Metadata

Assignees

No one assigned

    Labels

    breaking changeChanges that break backwards compatibility of the public API.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions