This function lets you compare portions of the text in a buffer, without copying them into strings first.
nil
for buffer1, buffer2, or both to stand for the
current buffer.
The value is negative if the first substring is less, positive if the first is greater, and zero if they are equal. The absolute value of the result is one plus the index of the first differing characters within the substrings.
This function ignores case when comparing characters
if case-fold-search
is non-nil
. It always ignores
text properties.
Suppose the current buffer contains the text `foobarbar haha!rara!'; then in this example the two substrings are `rbar ' and `rara!'. The value is 2 because the first substring is greater at the second character.
(compare-buffer-substring nil 6 11 nil 16 21) => 2
Go to the first, previous, next, last section, table of contents.