MCPcopy Create free account
hub / github.com/Effect-TS/effect / next

Method next

packages/effect/src/String.ts:1154–1174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1152 }
1153
1154 next(): IteratorResult<string> {
1155 if (this.done) {
1156 return { done: true, value: undefined }
1157 }
1158 const start = this.index
1159 while (!this.done && !isLineBreak(this.s[this.index]!)) {
1160 this.index = this.index + 1
1161 }
1162 let end = this.index
1163 if (!this.done) {
1164 const char = this.s[this.index]!
1165 this.index = this.index + 1
1166 if (!this.done && isLineBreak2(char, this.s[this.index]!)) {
1167 this.index = this.index + 1
1168 }
1169 if (!this.stripped) {
1170 end = this.index
1171 }
1172 }
1173 return { done: false, value: this.s.substring(start, end) }
1174 }
1175
1176 [Symbol.iterator](): IterableIterator<string> {
1177 return new LinesIterator(this.s, this.stripped)

Callers

nothing calls this directly

Calls 2

isLineBreakFunction · 0.85
isLineBreak2Function · 0.85

Tested by

no test coverage detected