1
1
# ChaiScript Extras
2
2
3
- User contributed wrappers for ChaiScript.
3
+ User contributed wrappers and modules for ChaiScript.
4
4
5
5
## Modules
6
6
7
7
- [ Math] ( #math ) : Adds common math methods to ChaiScript.
8
8
- [ String ID] ( #string-id ) : String hashing with [ string_id] ( https://github.com/foonathan/string_id )
9
- - [ String Methods ] ( #string-methods ) : Introduces some extra string methods to ChaiScript strings
9
+ - [ String] ( #string ) : Adds some extra string methods to ChaiScript strings
10
10
11
- ### Math
11
+ ## Math
12
12
13
13
The Math module adds some standard math functions to ChaiScript.
14
14
15
- #### Install
15
+ ### Install
16
16
``` cpp
17
17
#include " chaiscript/extras/math.hpp"
18
18
```
@@ -22,22 +22,22 @@ auto mathlib = chaiscript::extras::math::bootstrap();
22
22
chai.add(mathlib);
23
23
```
24
24
25
- #### Usage
25
+ ### Usage
26
26
27
27
``` chaiscript
28
28
var result = cos(0.5f)
29
29
```
30
30
31
- #### Options
31
+ ### Options
32
32
33
33
Compile with one of the following flags to enable or disable features...
34
34
- ` CHAISCRIPT_EXTRAS_MATH_SKIP_ADVANCED ` When enabled, will skip some of the advanced math functions.
35
35
36
- ### String ID
36
+ ## String ID
37
37
38
38
Adds [ String ID] ( https://github.com/foonathan/string_id ) support to ChaiScript.
39
39
40
- #### Install
40
+ ### Install
41
41
42
42
``` cpp
43
43
#include " chaiscript/extras/string_id.hpp"
@@ -48,7 +48,7 @@ auto string_idlib = chaiscript::extras::string_id::bootstrap();
48
48
chai.add(string_idlib);
49
49
```
50
50
51
- ### String Methods
51
+ ## String
52
52
53
53
Adds various string methods to extend how strings can be used in ChaiScript:
54
54
- ` string::replace(string, string) `
@@ -57,7 +57,7 @@ Adds various string methods to extend how strings can be used in ChaiScript:
57
57
- ` string::toLowerCase() `
58
58
- ` string::toUpperCase() `
59
59
60
- #### Install
60
+ ### Install
61
61
62
62
``` cpp
63
63
#include " chaiscript/extras/string_methods.hpp"
@@ -68,7 +68,7 @@ auto stringmethods = chaiscript::extras::string_methods::bootstrap();
68
68
chai.add(stringmethods);
69
69
```
70
70
71
- #### Usage
71
+ ### Usage
72
72
73
73
``` chaiscript
74
74
var input = "Hello, World!"
0 commit comments