codescalersinternships / home

home repo for internships
3 stars 0 forks source link

INI parser - doaasaber #35

Open doaasaber opened 2 years ago

doaasaber commented 2 years ago

Create an [INI] parser

expected API Can get inspired by configparser

LoadFromString LoadFromFile GetSectionNames list of all section names GetSections serialize convert into a dictionary/map { section_name: {key1: val1, key2, val2} ...} Get(section_name, key) gets the value of key key in section section_name Set(section_name, key, value) sets a key in section section_name to value value ToString SaveToFile

deliverables Code committed on username-inigo repo Tests Github actions API documentation Enduser documentation

remarks assume there're no global keys, every keys need to be part of a section assume the key value separator is just = keys and values should have spaces trimmed comments are only valid at the beginning of the line

doaasaber commented 2 years ago

finished LoadFromString , LoadFromFile , Get(section_name, key) ,GetSections serialize

doaasaber commented 2 years ago

finished Get(section_name, key) , Set(section_name, key, value)

doaasaber commented 2 years ago

Code committed on username-inigo repo LoadFromString LoadFromFile GetSectionNames list of all section names GetSections serialize convert into a dictionary/map { section_name: {key1: val1, key2, val2} ...} Get(section_name, key) gets the value of key key in section section_name Set(section_name, key, value) sets a key in section section_name to value value ToString SaveToFile