You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: unicode14_rules.go
    path of file: ./repos/gdlv/vendor/github.com/go-text/typesetting/segmenter
    
    the code of the file until where you have to start completion: // SPDX-License-Identifier: Unlicense OR BSD-3-Clause

package segmenter

import (
	"unicode"

	ucd "github.com/go-text/typesetting/unicodedata"
)

// Apply the Line Breaking Rules and returns the computed break opportunity
// See https://unicode.org/reports/tr14/#BreakingRules
func (cr *cursor) applyLineBreakingRules() brea
    
func (cr *cursor) startIteration(text []rune, i int) {
	cr.prev = cr.r
	if i < len(text) {
		cr.r = text[i]
	} else {
		cr.r = paragraphSeparator
	}
	if i == len(text) {
		cr.next = 0
	} else if i == len(text)-1 {
		// we fill in the last element of `attrs` by assuming
		// there's a paragraph separators off the end of text
		cr.next = paragraphSeparator
	} else {
		cr.next = text[i+1]
	}

	// query general unicode properties for the current rune
	cr.isExtentedPic = unicode.Is(ucd.Extended_Pictographic, cr.r)

	cr.prevGrapheme = cr.grapheme
	cr.grapheme = ucd.LookupGraphemeBreakClass(cr.r)

	// prevPrevLine and prevLine are handled in endIteration
	cr.line = cr.nextLine // avoid calling LookupBreakClass twice
	cr.nextLine = ucd.LookupLineBreakClass(cr.next)
}