Skip to content

Commit

Permalink
Change to avoid ambiguity in StrRegex
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottPJones committed Sep 25, 2018
1 parent fa45b82 commit 2b53fde
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords = ["Strings"]
license = "MIT"
desc = "Basic functionality for Str types"
authors = ["ScottPJones <scottjones@alum.mit.edu>"]
version = "0.1.4"
version = "0.1.5"

[deps]
CharSetEncodings = "cb9422de-a9d8-5b68-86db-ff05833ab307"
Expand Down
42 changes: 21 additions & 21 deletions src/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -116,27 +116,27 @@ Base._split(str::MaybeSub{<:Str}, splitter, limit, keepempty, vec) =
Base._rsplit(str::MaybeSub{<:Str}, splitter, limit, keepempty, vec) =
__rsplit(str, splitter, limit, keepempty, vec)

split(str::MaybeSub{<:Str{C}}, splitter;
limit::Integer=0, keepempty::Bool=true, keep::Union{Nothing,Bool}=nothing) where {C<:CSE} =
__split(str, splitter, limit, checkkeep(keepempty, keep, :split), splitarr(C))

split(str::MaybeSub{<:Str{C}}, splitter::AbstractChar;
limit::Integer=0, keepempty::Bool=true, keep::Union{Nothing,Bool}=nothing) where {C<:CSE} =
__split(str, isequal(splitter), limit, checkkeep(keepempty, keep, :split), splitarr(C))

split(str::MaybeSub{<:Str{C}}, splitter::SetOfChars;
limit::Integer=0, keepempty::Bool=true, keep::Union{Nothing,Bool}=nothing) where {C<:CSE} =
__split(str, in(splitter), limit, checkkeep(keepempty, keep, :split), splitarr(C))

rsplit(str::MaybeSub{<:Str{C}}, splitter;
limit::Integer=0, keepempty::Bool=true, keep::Union{Nothing,Bool}=nothing) where {C<:CSE} =
__rsplit(str, splitter, limit, checkkeep(keepempty, keep, :rsplit), splitarr(C))
rsplit(str::MaybeSub{<:Str{C}}, splitter::AbstractChar;
limit::Integer=0, keepempty::Bool=true, keep::Union{Nothing,Bool}=nothing) where {C<:CSE} =
__rsplit(str, isequal(splitter), limit, checkkeep(keepempty, keep, :rsplit), splitarr(C))
rsplit(str::MaybeSub{<:Str{C}}, splitter::SetOfChars;
limit::Integer=0, keepempty::Bool=true, keep::Union{Nothing,Bool}=nothing) where {C<:CSE} =
__rsplit(str, in(splitter), limit, checkkeep(keepempty, keep, :rsplit), splitarr(C))
split(str::MaybeSub{<:Str}, splitter;
limit::Integer=0, keepempty::Bool=true, keep::Union{Nothing,Bool}=nothing) =
__split(str, splitter, limit, checkkeep(keepempty, keep, :split), splitarr(str))

split(str::MaybeSub{<:Str}, splitter::AbstractChar;
limit::Integer=0, keepempty::Bool=true, keep::Union{Nothing,Bool}=nothing) =
__split(str, isequal(splitter), limit, checkkeep(keepempty, keep, :split), splitarr(str))

split(str::MaybeSub{<:Str}, splitter::SetOfChars;
limit::Integer=0, keepempty::Bool=true, keep::Union{Nothing,Bool}=nothing) =
__split(str, in(splitter), limit, checkkeep(keepempty, keep, :split), splitarr(str))

rsplit(str::MaybeSub{<:Str}, splitter;
limit::Integer=0, keepempty::Bool=true, keep::Union{Nothing,Bool}=nothing) =
__rsplit(str, splitter, limit, checkkeep(keepempty, keep, :rsplit), splitarr(str))
rsplit(str::MaybeSub{<:Str}, splitter::AbstractChar;
limit::Integer=0, keepempty::Bool=true, keep::Union{Nothing,Bool}=nothing) =
__rsplit(str, isequal(splitter), limit, checkkeep(keepempty, keep, :rsplit), splitarr(str))
rsplit(str::MaybeSub{<:Str}, splitter::SetOfChars;
limit::Integer=0, keepempty::Bool=true, keep::Union{Nothing,Bool}=nothing) =
__rsplit(str, in(splitter), limit, checkkeep(keepempty, keep, :rsplit), splitarr(str))

# Todo: this is using print, but it should be changed to make sure that everything is done via
# writes (i.e. no translation to UTF-8)
Expand Down

0 comments on commit 2b53fde

Please sign in to comment.