FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

libconfig wrapper

 
Post new topic   Reply to topic     Forum Index -> Potential Projects
View previous topic :: View next topic  
Author Message
raup-tier



Joined: 12 Jul 2008
Posts: 15
Location: Germany

PostPosted: Sat May 08, 2010 1:35 pm    Post subject: libconfig wrapper Reply with quote

Hi,

i've done a wrapper arounde the libconfig-C-API for easy use
in D.

libconfig is realy a nice and fast tool if you have a little bit more and
complex to configure Wink

Example:
main.d
Code:

module main;

import tango.io.Stdout;
import Config;

int main( char[][] args ) {

  Config conf = new Config();

  conf.read( "test.cfg" );

  char[] str = cast( char[] ) conf.lookup( "f" );

  Stdout( str ).newline();

  return 0;
}


test.cfg
Code:

f = "0.1";
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Potential Projects All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group