helturkey/bidi

dev-main 2024-09-18 13:47 UTC

This package is auto-updated.

Last update: 2024-09-18 13:47:39 UTC


README

阿拉伯双向文本处理最佳和最准确的PHP包,现在您可以在图像上轻松写入文本。

安装

使用PHP包管理器composer进行安装。

composer req helturkey/bidi

用法

use Hussein\Bidirection\ArabicUtf8;

# returns 'text'

public static function mb_wordwrap(string $string, int $width = 75, $break = "\n", bool $cut = false): string
{
      ........
}

$wrapped = ArabicUtf8::mb_wordwrap($text, $max_chars);


# convert method accepts array or string to convert and returns array or string as passed.

public static function convert(array|string $text, $forcertl = false): array|string
{
      ........
}

$converted = ArabicUtf8::convert($wrapped);

贡献

欢迎提交拉取请求。对于重大变更,请先创建一个问题来讨论您希望更改的内容。

请确保根据需要更新测试。

许可证

MIT