MCPcopy Create free account
hub / github.com/microsoft/typescript-go / HasTrailingWhitespace

Method HasTrailingWhitespace

internal/printer/textwriter.go:69–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67}
68
69func (w *textWriter) HasTrailingWhitespace() bool {
70 if w.builder.Len() == 0 {
71 return false
72 }
73 ch, _ := utf8.DecodeLastRuneInString(w.lastWritten)
74 if ch == utf8.RuneError {
75 return false
76 }
77 return stringutil.IsWhiteSpaceLike(ch)
78}
79
80func (w *textWriter) IncreaseIndent() {
81 w.indent++

Callers

nothing calls this directly

Calls 2

IsWhiteSpaceLikeFunction · 0.92
LenMethod · 0.65

Tested by

no test coverage detected