Giter Site home page Giter Site logo

rkt-config-ini's Introduction

rkt-config-ini

Config INI reader/writer by Racket language

require

(require config-ini)

function

new ini struct

The my-ini variable will be used by ini-read/ini-write, and it is a mutable hash table.

(define my-ini (ini-new))

read ini from path

(ini-read my-ini "/tmp/test.ini")

write ini to path

(ini-write my-ini "/tmp/test2.ini")

get section list

(ini-sections my-ini)

test if token is in ini

(ini-has-key? my-ini "global" "ip")

test if entry is in ini

(ini-has-section? my-ini "global")

get string value from ini

(ini-get-key-string my-ini "global" "ip")

get number value from ini

(ini-get-key-number my-ini "global" "port")

get boolean value from ini

(ini-get-key-boolean my ini "global" "reuse")

set value to ini

value must be string

(ini-set-key my-ini "global" "ip" "0.0.0.0")

(ini-set-key my-ini "global" "port" (number->string 8080))

(ini-set-key my-ini "global" "reuse" "yes")

remove key from ini

(ini-remove-key my-ini "global" "ip")

remove section from ini

(ini-remove-section my-ini "global")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.