summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-12-05 15:24:11 +0100
committerTyge Løvset <[email protected]>2020-12-05 15:24:11 +0100
commit9674b3588d133007429f69010311349f9afbae04 (patch)
treeffb47946a0c5d07b6ee68b36a17c32e27508b8c0
parent17196445c8e3b0186d61abfa04cf97529233b1a2 (diff)
downloadSTC-modified-9674b3588d133007429f69010311349f9afbae04.tar.gz
STC-modified-9674b3588d133007429f69010311349f9afbae04.zip
Some formatting changes.
-rw-r--r--docs/crandom_api.md8
-rw-r--r--docs/cstr_api.md24
2 files changed, 16 insertions, 16 deletions
diff --git a/docs/crandom_api.md b/docs/crandom_api.md
index d31f19c8..df7569f8 100644
--- a/docs/crandom_api.md
+++ b/docs/crandom_api.md
@@ -36,8 +36,8 @@ All cstr definitions and prototypes may be included in your C source file by inc
9) float crand_uniform_f32(crand_rng32_t* rng, crand_uniform_f32_t* dist);
```
`1-2)` PRNG 32-bit engine initializers. `3)` Integer RNG with range \[0, 2^32). `4)` Float RNG with range \[0, 1).
-`5-6)` Uniform integer RNG with range \[`low`, `high`]. `7)` Unbiased version, see https://github.com/lemire/fastrange.
-`8-9)` Uniform float RNG with range \[`low`, `high`).
+`5-6)` Uniform integer RNG with range \[*low*, *high*]. `7)` Unbiased version, see https://github.com/lemire/fastrange.
+`8-9)` Uniform float RNG with range \[*low*, *high*).
```c
1) crand_rng64_t crand_rng64_with_seq(uint64_t seed, uint64_t seq);
2) crand_rng64_t crand_rng64_init(uint64_t seed);
@@ -51,8 +51,8 @@ All cstr definitions and prototypes may be included in your C source file by inc
10) double crand_normal_f64(crand_rng64_t* rng, crand_normal_f64_t* dist);
```
`1-2)` PRNG 64-bit engine initializers. `3)` Integer generator, range \[0, 2^64). `4)` Double RNG with range \[0, 1).
-`5-6)` Uniform integer RNG with range \[`low`, `high`]. `7-8)` Uniform double RNG with range \[`low`, `high`).
-`9-10)` Normal-distributed double RNG with range [`mean`-`stddev`, `mean`+`stddev`].
+`5-6)` Uniform integer RNG with range \[*low*, *high*]. `7-8)` Uniform double RNG with range \[*low*, *high*).
+`9-10)` Normal-distributed double RNG with range [*mean*-*stddev*, *mean*+*stddev*].
The method `crand_i64(crand_rng64_t* rng)` is an extremely fast PRNG suited for parallel usage, featuring
a Weyl-sequence as part of the state. It is faster than *sfc64*, *wyhash64*, *pcg*, and the *xoroshiro*
diff --git a/docs/cstr_api.md b/docs/cstr_api.md
index 88b1b746..d3c86532 100644
--- a/docs/cstr_api.md
+++ b/docs/cstr_api.md
@@ -36,9 +36,9 @@ All cstr definitions and prototypes may be included in your C source file by inc
7) cstr_t cstr_clone(cstr_t s);
8) void cstr_del(cstr_t *self);
```
-`1)` Create an empty string, `2)` with capacity. `3)` Create a string by repeating `fill` character `len` times.
-`4)` Construct a string from `str`, and `5)` limit the length by `len` and `strlen(str)`.
-`6)` Construct a string from the format specified by `fmt` and arguments, using `printf()` formatting.
+`1)` Create an empty string, `2)` with capacity. `3)` Create a string by repeating *fill* character *len* times.
+`4)` Construct a string from *str*, and `5)` limit the length by *len* and *strlen(str)*.
+`6)` Construct a string from the format specified by *fmt* and arguments, using *printf()* formatting.
`7)` Construct a new string by cloning another string. `8)` Free the allocated memory used by string.
```c
size_t cstr_size(cstr_t s);
@@ -58,8 +58,8 @@ These returns properties of a string. `5-6)` returns reference, ie. pointer to t
6) cstr_t* cstr_take(cstr_t* self, cstr_t s);
7) cstr_t cstr_move(cstr_t* self);
```
-`1-3)` Reserve, resize, clear string. `4)` Assign `str` to string, `5)` assign substring `str` limited by
-`len` and `strlen(str)`. `6)` Take the constructed or moved string `s`, i.e., no allocation takes place.
+`1-3)` Reserve, resize, clear string. `4)` Assign *str* to string. `5)` assign substring *str* limited by
+*len* and *strlen(str)*. `6)` Take the constructed or moved string *s*, i.e., no allocation takes place.
`7)` Explicitly move string to the caller of the method; string becomes empty after move.
```c
1) cstr_t* cstr_append(cstr_t* self, const char* str);
@@ -72,10 +72,10 @@ These returns properties of a string. `5-6)` returns reference, ie. pointer to t
8) void cstr_replace(cstr_t* self, size_t pos, size_t len, const char* str);
9) void cstr_replace_n(cstr_t* self, size_t pos, size_t len, const char* str, size_t n);
```
-`1)` Append `str` to string. `2)` Append substring `str` limited by `len`. `3)`, Append character `ch`.
-`4)` Erase last character. `5)` Insert string at a positions, `6)` string limited by n characters.
-`7)` Erase n characters at position pos. `8)` Replace len characters at position pos with str,
-`9)` replacement str limited by n characters.
+`1)` Append *str* to string. `2)` Append substring *str* limited by *len*. `3)` Append character *ch*.
+`4)` Erase last character. `5)` Insert string at a position *pos*. `6)` string limited by n characters.
+`7)` Erase *n* characters at position *pos*. `8)` Replace *len* characters at position *pos* with *str*.
+`9)` Replace with *str* limited by *n* characters.
```c
int cstr_compare(const cstr_t *s1, const cstr_t *s2);
bool cstr_equals(cstr_t s, const char* str);
@@ -91,19 +91,19 @@ These returns properties of a string. `5-6)` returns reference, ie. pointer to t
bool cstr_ends_with(cstr_t s, const char* substr);
bool cstr_iends_with(cstr_t s, const char* substr);
```
-Compare and search methods. Methods prefixed by `i` does case-insensitive compare/search.
+Compare and search methods. Methods prefixed by *i* does case-insensitive compare/search.
```c
cstr_iter_t cstr_begin(cstr_t* self);
cstr_iter_t cstr_end(cstr_t* self);
void cstr_next(cstr_iter_t* it);
char* cstr_itval(cstr_iter_t it);
```
-Iterator methods, typically used via the general `c_foreach` macro.
+Iterator methods, typically used via the general *c_foreach* macro.
```c
1) bool cstr_getline(cstr_t *self, FILE *stream);
2) bool cstr_getdelim(cstr_t *self, int delim, FILE *stream);
```
-`1-2)` Read a line of text from stream and store it in string. Line is separated by delim, which is '\n' in `1)`.
+`1-2)` Read a line of text from *stream* and store it in string. Line is separated by *delim*, which is *'\n'* in `1)`.
```c
const char* cstr_to_raw(const cstr_t* x);
int cstr_compare_raw(const char** x, const char** y);