You don't overload the string representation by overloading string, you do it by overloading show. This is what is called by print, string, etc:
function Base.show(io::IO, f::Foo)
print(io, "f or whatever")
end
You don't overload the string representation by overloading string, you do it by overloading show. This is what is called by print, string, etc:
function Base.show(io::IO, f::Foo)
print(io, "f or whatever")
end