@@ -295,6 +295,8 @@ according to the order specified by the `by`, `lt` and `rev` keywords, assuming
295295is already sorted in that order. Return an empty range located at the insertion point
296296if `a` does not contain values equal to `x`.
297297
298+ See [`sort!`](@ref) for an explanation of the keyword arguments `by`, `lt` and `rev`.
299+
298300See also: [`insorted`](@ref), [`searchsortedfirst`](@ref), [`sort`](@ref), [`findall`](@ref).
299301
300302# Examples
@@ -313,6 +315,9 @@ julia> searchsorted([1, 2, 4, 5, 5, 7], 9) # no match, insert at end
313315
314316julia> searchsorted([1, 2, 4, 5, 5, 7], 0) # no match, insert at start
3153171:0
318+
319+ julia> searchsorted([1=>"one", 2=>"two", 2=>"two", 4=>"four"], 2=>"two", by=first) # compare the keys of the pairs
320+ 2:3
316321```
317322""" searchsorted
318323
@@ -325,6 +330,8 @@ specified order. Return `lastindex(a) + 1` if `x` is greater than all values in
325330
326331`insert!`ing `x` at this index will maintain sorted order.
327332
333+ See [`sort!`](@ref) for an explanation of the keyword arguments `by`, `lt` and `rev`.
334+
328335See also: [`searchsortedlast`](@ref), [`searchsorted`](@ref), [`findfirst`](@ref).
329336
330337# Examples
@@ -343,6 +350,9 @@ julia> searchsortedfirst([1, 2, 4, 5, 5, 7], 9) # no match, insert at end
343350
344351julia> searchsortedfirst([1, 2, 4, 5, 5, 7], 0) # no match, insert at start
3453521
353+
354+ julia> searchsortedfirst([1=>"one", 2=>"two", 4=>"four"], 3=>"three", by=first) # Compare the keys of the pairs
355+ 3
346356```
347357""" searchsortedfirst
348358
@@ -353,6 +363,8 @@ Return the index of the last value in `a` less than or equal to `x`, according t
353363specified order. Return `firstindex(a) - 1` if `x` is less than all values in `a`. `a` is
354364assumed to be sorted.
355365
366+ See [`sort!`](@ref) for an explanation of the keyword arguments `by`, `lt` and `rev`.
367+
356368# Examples
357369```jldoctest
358370julia> searchsortedlast([1, 2, 4, 5, 5, 7], 4) # single match
@@ -369,6 +381,9 @@ julia> searchsortedlast([1, 2, 4, 5, 5, 7], 9) # no match, insert at end
369381
370382julia> searchsortedlast([1, 2, 4, 5, 5, 7], 0) # no match, insert at start
3713830
384+
385+ julia> searchsortedlast([1=>"one", 2=>"two", 4=>"four"], 3=>"three", by=first) # compare the keys of the pairs
386+ 2
372387```
373388""" searchsortedlast
374389
0 commit comments