Giter Club home page Giter Club logo

rustdatabook's Introduction

how to use:

How to structure a rdb file:

|test_A|This is an array ,b,c,1ad  
|test_M|This is a string or Meta tag   
|test_D|this is a number tag  

add _A or _M or _D to the name to select the types!
the _A _M and _D will be ignored when using findValue
so only use the name you specified when trying to look for it.

How to 'compile' a rdb file

use rdbData(&str) the string is the name of the file.
to find the position of the data use findValue
Disclaimer: due to rust for some reason the values will start on 1 and not 0.
if you try to get value 0 you will only be left with "" or 0

after that you will be given a dataBook ( from rdbData):

pub struct dataBook{  
    pub NM:Vec<String>, //NM = name meta  
    pub ND:Vec<String>, //ND = name digit  
    pub D:Vec<i64>, //D = digit  
    pub M:Vec<String>, //M  = meta  
    pub A:Vec<Vec<String>>, //A = array  
    pub AN:Vec<String> //AN = array name  
}

you dont need to make your own dataBook as it can be found in rustDatabook::dataBook

How to use find value

findValue(&str,&dataBook,&str) -> usize first str is the name of the value and the second str is what type so _A _M _D

How to change data:

changeData(&str &str &str): name of the file, the new data, the name of the data aka |changethisdata_M|

How to add Data:

addData(&str &str): name of the file, the new data in this format |name+(type)|added data

Remove data:

removeData(&str,&str): name of the file, name of the data

after changeing data you need to re parse the file

How to use copyValueToNew:

copyValueToNew(name:&str,newName:&str, copyName:&str,xx: dataBook,typ:&str): name of the file, name of the new data which is going to be added , name of the data you will be copying, the databook, type if it is _M _A or _D

rustdatabook's People

Contributors

salmmanfred avatar

Watchers

 avatar

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.