isgraph
isgraph(c::Union{Char,AbstractString}) -> Bool
Tests whether a character is printable, and not a space, or whether this is true for all elements of a string. Any character that would cause a printer to use ink should be classified with isgraph(c)==true.
Examples
julia> isgraph('A')
true
julia> isgraph(' ')
false
julia> isgraph('\t')
false
julia> isgraph("Hello")
true
julia> isgraph("Hello, World!")
true
julia> isgraph(" ")
false
The isgraph function checks whether a character is printable and not a space. If a character is printable and not a space, it returns true. If the input is a string, it checks whether all the characters in the string are printable and not spaces.
Common mistake example:
julia> isgraph(65)
ERROR: MethodError: no method matching isgraph(::Int64)
In this example, isgraph is called with an argument of type Int64, which is not a valid argument type. The argument should be either a Char or an AbstractString.
See Also
BigFloat, BigInt, Dict, eltype, fieldtype, Float32, Float64, IntSet, isa, isalnum, isalpha, isascii, iseltype, isequal, isgraph, isimmutable, isinteractive, isleaftype, isnull, ispunct, isspace, issubtype, keytype, Nullable, NullException, promote_type, typeintersect, typejoin, typemax, typemin, typeof, Val, valtype,User Contributed Notes
Add a Note
The format of note supported is markdown, use triple backtick to start and end a code block.