Skip to content

Commit

Permalink
Add @doc to ensure doc for readstring/readall is used
Browse files Browse the repository at this point in the history
  • Loading branch information
nalimilan committed Feb 6, 2016
1 parent 475824b commit 5f601c2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/StringEncodings.jl
Original file line number Diff line number Diff line change
Expand Up @@ -288,19 +288,19 @@ end

## Convenience I/O functions
if isdefined(Base, :readstring)
"""
@doc """
readstring(stream or filename, enc::ASCIIString)
Read the entire contents of an I/O stream or a file in encoding `enc` as a string.
"""
""" ->
Base.readstring(s::IO, enc::ASCIIString) = readstring(StringDecoder(s, enc))
Base.readstring(filename::AbstractString, enc::ASCIIString) = open(io->readstring(io, enc), filename)
else # Compatibility with Julia 0.4
"""
@doc """
readall(stream or filename, enc::ASCIIString)
Read the entire contents of an I/O stream or a file in encoding `enc` as a string.
"""
""" ->
Base.readall(s::IO, enc::ASCIIString) = readall(StringDecoder(s, enc))
Base.readall(filename::AbstractString, enc::ASCIIString) = open(io->readall(io, enc), filename)
end
Expand Down

0 comments on commit 5f601c2

Please sign in to comment.