fn iterateSection(ini: Ini, header: []const u8) SectionIterator
[src]
Asserts that header
includes ā\n[ā at the beginning and ā]\nā at the end. header
must remain valid for the lifetime of the iterator.
DocTests
test iterateSection { const example = \\[package] \\name=libffmpeg \\version=5.1.2 \\ \\[dependency] \\id=libz \\url=url1 \\ \\[dependency] \\id=libmp3lame \\url=url2 ; var ini: Ini = .{ .bytes = example }; var it = ini.iterateSection("\n[dependency]\n"); const section1 = it.next() orelse return error.TestFailed; try testing.expectEqualStrings("id=libz\nurl=url1\n", section1); const section2 = it.next() orelse return error.TestFailed; try testing.expectEqualStrings("id=libmp3lame\nurl=url2", section2); try testing.expect(it.next() == null); }