Skip to content

Commit 91ac221

Browse files
committed
~improve docs
1 parent 60b04c2 commit 91ac221

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

.env.dist

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
USE_FFI=true
2-
UNICODE_VERSION=latest
3-
41
VAR_DUMPER_SERVER=app:9912
52
WORKING_DIR=/app
3+
4+
# Package related variables
5+
USE_FFI=true
6+
UNICODE_VERSION=latest

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ echo wcwidth('🐘🐘🐘'); // 2 - only first char is considered
4646
### <a name="ffi-extension"></a> FFI extension
4747
> ‼️ Experimental feature.
4848
49-
If `FFI` extension is available, it can be used for better performance. To enable it, set `USE_FFI` environment variable to `true`.
49+
For improved performance, consider leveraging the Foreign Function Interface (`FFI`) extension, if available. To enable
50+
this feature, set the `USE_FFI` environment variable to `true`.
5051

5152
```dotenv
5253
USE_FFI=true
5354
```
54-
> **Note** When using ffi extension `version` is ignored completely.
55+
> **Note** When using `ffi` extension `version` value is ignored completely.

doc/usage.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ function wcswidth(string $wcs, ?string $version = null): int;
1818

1919
### Unicode version
2020

21-
> Note: When using ffi extension version is ignored completely.
21+
> Note: When using `ffi` extension version value is ignored completely.
2222
23-
Unicode version can be set globally for all functions using `UnicodeVersion::set()` method or through `UNICODE_VERSION` environment variable automatically.
23+
Unicode version can be set globally for all functions using `UnicodeVersion::set()` method or through `UNICODE_VERSION`
24+
environment variable automatically.
2425
```php
2526
use AlecRabbit\WcWidth\UnicodeVersion;
2627

@@ -47,12 +48,13 @@ use AlecRabbit\WcWidth\UnicodeVersion;
4748
echo UnicodeVersion::get(); // 14.0.0
4849
```
4950

50-
If, for some reason, you need to reset current version to `null`, use `UnicodeVersion::reset()` method.
51-
51+
In case you need to reset the current version to `null` for any specific reason, you can achieve this by utilizing the
52+
`UnicodeVersion::reset()` method.
5253
```php
5354
use AlecRabbit\WcWidth\UnicodeVersion;
5455

5556
UnicodeVersion::reset();
5657
```
5758

58-
> Note: The package suggests to install `ext-mbstring` but it's implied that it is already installed or some polyfill is used.
59+
> The package recommends installing `ext-mbstring`, although it assumes that this extension is either already installed
60+
> or that a suitable polyfill is being used.

0 commit comments

Comments
 (0)