fixed string indexing
Merge pull request #97 from TyOverby/master

fixed string indexing. closes 96
Squashed commit of the following:

commit 583f69d0e09620a2fc9a2e29afb3662bb9926293
Author: Tomaka17 <pierre.krieger1708@gmail.com>
Date:   Thu Jul 3 20:42:09 2014 +0200

    Simply implementation by using some pre-defined functions

commit 8ea06bcc765dc89c4811ab18a9f3e6218b7c7c18
Author: Tomaka17 <pierre.krieger1708@gmail.com>
Date:   Thu Jul 3 20:28:25 2014 +0200

    Make sure that the rust parser parses all the bindings

commit 95a2ce15673625ee6a1c8822830691c512e5ce32
Author: Tomaka17 <pierre.krieger1708@gmail.com>
Date:   Thu Jul 3 13:48:52 2014 +0200

    Remove compiler warnings

commit 9643ebd106e0ac80539389763d7d85a6389da578
Author: Tomaka17 <pierre.krieger1708@gmail.com>
Date:   Thu Jul 3 13:13:09 2014 +0200

    Fix to rust-nightly

commit 32993b9212ab3a623a4462602b93818b293018a3
Author: Tomaka17 <pierre.krieger1708@gmail.com>
Date:   Thu Jul 3 13:11:09 2014 +0200

    Cleaner error handling inside macro
    Prevent the rust compiler from crashing

commit 8b3a607879cea6e29449c68565cf9ff53691ef5c
Author: Tomaka17 <pierre.krieger1708@gmail.com>
Date:   Thu Jul 3 12:50:05 2014 +0200

    DRY with lib.rs and main.rs

commit 82ac1a935f8d09e3f84f653dfd00a6e6aec59e0d
Author: Tomaka17 <pierre.krieger1708@gmail.com>
Date:   Thu Jul 3 12:35:19 2014 +0200

    Use rustc's macro system to generate the bindings