Skip to content

Commit f9f097d

Browse files
replace non-breaking spaces with plain spaces
1 parent cc9ae64 commit f9f097d

23 files changed

Lines changed: 79 additions & 79 deletions

File tree

HISTORY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4099,7 +4099,7 @@ Library improvements
40994099
41004100
+ Using colons (`:`) to represent a collection of indices is deprecated. They now must be
41014101
explicitly converted to a specialized array of integers with the `to_indices` function.
4102-
   As a result, the type of `SubArray`s that represent views over colon indices has changed.
4102+
As a result, the type of `SubArray`s that represent views over colon indices has changed.
41034103
41044104
+ Logical indexing is now more efficient. Logical arrays are converted by `to_indices` to
41054105
a lazy, iterable collection of indices that doesn't support indexing. A deprecation

base/abstractset.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ issetequal(a::AbstractSet, b) = issetequal(a, Set(b))
431431
function issetequal(a, b::AbstractSet)
432432
if haslength(a)
433433
# check b for too many unique elements
434-
length(a) < length(b) && return false
434+
length(a) < length(b) && return false
435435
end
436436
return issetequal(Set(a), b)
437437
end

base/array.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ the `value` that was passed; this means that if the `value` is itself modified,
449449
all elements of the `fill`ed array will reflect that modification because they're
450450
_still_ that very `value`. This is of no concern with `fill(1.0, (5,5))` as the
451451
`value` `1.0` is immutable and cannot itself be modified, but can be unexpected
452-
with mutable values like — most commonly — arrays. For example, `fill([], 3)`
452+
with mutable values like — most commonly — arrays. For example, `fill([], 3)`
453453
places _the very same_ empty array in all three locations of the returned vector:
454454
455455
```jldoctest

base/gmp.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ function digits!(a::AbstractVector{T}, n::BigInt; base::Integer = 10) where {T<:
736736
i, j = firstindex(a)-1, length(s)+1
737737
lasti = min(lastindex(a), firstindex(a) + length(s)-1 - isneg(n))
738738
while i < lasti
739-
# base ≤ 36: 0-9, plus a-z for 10-35
739+
# base ≤ 36: 0-9, plus a-z for 10-35
740740
# base > 36: 0-9, plus A-Z for 10-35 and a-z for 36..61
741741
x = s[j -= 1]
742742
a[i += 1] = base 36 ? (x>0x39 ? x-0x57 : x-0x30) : (x>0x39 ? (x>0x60 ? x-0x3d : x-0x37) : x-0x30)

base/indices.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ A linear indexing style uses one integer index to describe the position in the a
2323
(even if it's a multidimensional array) and column-major
2424
ordering is used to efficiently access the elements. This means that
2525
requesting [`eachindex`](@ref) from an array that is `IndexLinear` will return
26-
a simple one-dimensional range, even if it is multidimensional.
26+
a simple one-dimensional range, even if it is multidimensional.
2727
2828
A custom array that reports its `IndexStyle` as `IndexLinear` only needs
2929
to implement indexing (and indexed assignment) with a single `Int` index;
30-
all other indexing expressions — including multidimensional accesses — will
30+
all other indexing expressions — including multidimensional accesses — will
3131
be recomputed to the linear index. For example, if `A` were a `2×3` custom
3232
matrix with linear indexing, and we referenced `A[1, 3]`, this would be
3333
recomputed to the equivalent linear index and call `A[5]` since `2*1 + 3 = 5`.
@@ -50,13 +50,13 @@ a range of [`CartesianIndices`](@ref).
5050
5151
A `N`-dimensional custom array that reports its `IndexStyle` as `IndexCartesian` needs
5252
to implement indexing (and indexed assignment) with exactly `N` `Int` indices;
53-
all other indexing expressions — including linear indexing — will
53+
all other indexing expressions — including linear indexing — will
5454
be recomputed to the equivalent Cartesian location. For example, if `A` were a `2×3` custom
5555
matrix with cartesian indexing, and we referenced `A[5]`, this would be
5656
recomputed to the equivalent Cartesian index and call `A[1, 3]` since `5 = 2*1 + 3`.
5757
5858
It is significantly more expensive to compute Cartesian indices from a linear index than it is
59-
to go the other way. The former operation requires division — a very costly operation — whereas
59+
to go the other way. The former operation requires division — a very costly operation — whereas
6060
the latter only uses multiplication and addition and is essentially free. This asymmetry means it
6161
is far more costly to use linear indexing with an `IndexCartesian` array than it is to use
6262
Cartesian indexing with an `IndexLinear` array.

base/reflection.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,7 @@ Alternatively, in isolation `m1` and `m2` might be ordered, but if a third
15341534
method cannot be sorted with them, they may cause an ambiguity together.
15351535
15361536
For parametric types, the `ambiguous_bottom` keyword argument controls whether
1537-
`Union{}` counts as an ambiguous intersection of type parameters – when `true`,
1537+
`Union{}` counts as an ambiguous intersection of type parameters – when `true`,
15381538
it is considered ambiguous, when `false` it is not.
15391539
15401540
# Examples

base/strings/basic.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ about strings:
1616
* Each `AbstractChar` in a string is encoded by one or more code units
1717
* Only the index of the first code unit of an `AbstractChar` is a valid index
1818
* The encoding of an `AbstractChar` is independent of what precedes or follows it
19-
* String encodings are [self-synchronizing] – i.e. `isvalid(s, i)` is O(1)
19+
* String encodings are [self-synchronizing] – i.e. `isvalid(s, i)` is O(1)
2020
2121
[self-synchronizing]: https://en.wikipedia.org/wiki/Self-synchronizing_code
2222
@@ -46,8 +46,8 @@ AbstractString
4646
ncodeunits(s::AbstractString) -> Int
4747
4848
Return the number of code units in a string. Indices that are in bounds to
49-
access this string must satisfy `1 ≤ i ≤ ncodeunits(s)`. Not all such indices
50-
are valid – they may not be the start of a character, but they will return a
49+
access this string must satisfy `1 ≤ i ≤ ncodeunits(s)`. Not all such indices
50+
are valid – they may not be the start of a character, but they will return a
5151
code unit value when calling `codeunit(s,i)`.
5252
5353
# Examples
@@ -389,7 +389,7 @@ length(s::AbstractString) = @inbounds return length(s, 1, ncodeunits(s)::Int)
389389
function length(s::AbstractString, i::Int, j::Int)
390390
@boundscheck begin
391391
0 < i ncodeunits(s)::Int+1 || throw(BoundsError(s, i))
392-
0  j < ncodeunits(s)::Int+1 || throw(BoundsError(s, j))
392+
0 j < ncodeunits(s)::Int+1 || throw(BoundsError(s, j))
393393
end
394394
n = 0
395395
for k = i:j
@@ -438,8 +438,8 @@ thisind(s::AbstractString, i::Integer) = thisind(s, Int(i))
438438
function thisind(s::AbstractString, i::Int)
439439
z = ncodeunits(s)::Int + 1
440440
i == z && return i
441-
@boundscheck 0  i z || throw(BoundsError(s, i))
442-
@inbounds while 1 < i && !(isvalid(s, i)::Bool)
441+
@boundscheck 0 i z || throw(BoundsError(s, i))
442+
@inbounds while 1 < i && !(isvalid(s, i)::Bool)
443443
i -= 1
444444
end
445445
return i
@@ -498,7 +498,7 @@ function prevind(s::AbstractString, i::Int, n::Int)
498498
z = ncodeunits(s) + 1
499499
@boundscheck 0 < i z || throw(BoundsError(s, i))
500500
n == 0 && return thisind(s, i) == i ? i : string_index_err(s, i)
501-
while n > 0 && 1 < i
501+
while n > 0 && 1 < i
502502
@inbounds n -= isvalid(s, i -= 1)
503503
end
504504
return i - n
@@ -557,7 +557,7 @@ function nextind(s::AbstractString, i::Int, n::Int)
557557
z = ncodeunits(s)
558558
@boundscheck 0 i z || throw(BoundsError(s, i))
559559
n == 0 && return thisind(s, i) == i ? i : string_index_err(s, i)
560-
while n > 0 && i < z
560+
while n > 0 && i < z
561561
@inbounds n -= isvalid(s, i += 1)
562562
end
563563
return i + n

base/strings/io.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ function show(
209209

210210
# early out for short strings
211211
len = ncodeunits(str)
212-
len  limit - 2 && # quote chars
212+
len limit - 2 && # quote chars
213213
return show(io, str)
214214

215215
# these don't depend on string data

base/strings/string.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ function getindex_continued(s::String, i::Int, u::UInt32)
236236
end
237237
n = ncodeunits(s)
238238

239-
(i += 1) > n && @goto ret
239+
(i += 1) > n && @goto ret
240240
@inbounds b = codeunit(s, i) # cont byte 1
241241
b & 0xc0 == 0x80 || @goto ret
242242
u |= UInt32(b) << 16
@@ -276,7 +276,7 @@ length(s::String) = length_continued(s, 1, ncodeunits(s), ncodeunits(s))
276276
@inline function length(s::String, i::Int, j::Int)
277277
@boundscheck begin
278278
0 < i ncodeunits(s)+1 || throw(BoundsError(s, i))
279-
0  j < ncodeunits(s)+1 || throw(BoundsError(s, j))
279+
0 j < ncodeunits(s)+1 || throw(BoundsError(s, j))
280280
end
281281
j < i && return 0
282282
@inbounds i, k = thisind(s, i), i
@@ -289,21 +289,21 @@ end
289289
@inbounds b = codeunit(s, i)
290290
@inbounds while true
291291
while true
292-
(i += 1)  n || return c
293-
0xc0  b  0xf7 && break
292+
(i += 1) n || return c
293+
0xc0 b 0xf7 && break
294294
b = codeunit(s, i)
295295
end
296296
l = b
297297
b = codeunit(s, i) # cont byte 1
298298
c -= (x = b & 0xc0 == 0x80)
299299
x & (l 0xe0) || continue
300300

301-
(i += 1)  n || return c
301+
(i += 1) n || return c
302302
b = codeunit(s, i) # cont byte 2
303303
c -= (x = b & 0xc0 == 0x80)
304304
x & (l 0xf0) || continue
305305

306-
(i += 1)  n || return c
306+
(i += 1) n || return c
307307
b = codeunit(s, i) # cont byte 3
308308
c -= (b & 0xc0 == 0x80)
309309
end

base/strings/substring.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ struct SubString{T<:AbstractString} <: AbstractString
2525
ncodeunits::Int
2626

2727
function SubString{T}(s::T, i::Int, j::Int) where T<:AbstractString
28-
i  j || return new(s, 0, 0)
28+
i j || return new(s, 0, 0)
2929
@boundscheck begin
3030
checkbounds(s, i:j)
3131
@inbounds isvalid(s, i) || string_index_err(s, i)

0 commit comments

Comments
 (0)