ISplitIterator.opApply

'foreach' iteration over string slices between the current and the next delimiter. n() returns the number of 'foreach' loop cycles so far, remaining() the slice after the next delimiter to the content end. If no delimiter was found, n() is 0 after 'foreach' has finished and remaining() returns the content.

segment slices content so do not modify it. However, the content of segment may be modified which will result in an in-place modification of the content.

  1. int opApply(int delegate(ref cstring segment) dg_in)
    class ISplitIterator
    int
    opApply
    (
    scope int delegate dg_in
    )
  2. int opApply(int delegate(ref size_t pos, ref cstring segment) dg_in)

Meta