2023-09-26 06:24:03 +00:00
|
|
|
```
|
|
|
|
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
|
|
|
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
|
|
|
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
|
|
|
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
|
|
|
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
|
|
|
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
|
|
|
```
|
|
|
|
# final class StringHelper (Details)
|
2024-04-06 13:05:35 +00:00
|
|
|
> namespace: **TrueChristianChurch\Joomla\GetBible\Utilities**
|
2023-09-26 06:24:03 +00:00
|
|
|
```uml
|
|
|
|
@startuml
|
2023-10-07 12:23:18 +00:00
|
|
|
class StringHelper << (F,LightGreen) >> #RoyalBlue {
|
2023-09-26 06:24:03 +00:00
|
|
|
+ split(string $text) : array
|
|
|
|
+ splitToWords(string $text, bool $punctuation = true) : array
|
|
|
|
+ isCJK(string $text) : bool
|
|
|
|
+ hasLength(string $word) : bool
|
|
|
|
}
|
|
|
|
|
|
|
|
note right of StringHelper::split
|
|
|
|
Return an array of words
|
|
|
|
|
|
|
|
return: array
|
|
|
|
end note
|
|
|
|
|
|
|
|
note right of StringHelper::splitToWords
|
|
|
|
Return an array of only words
|
|
|
|
|
|
|
|
return: array
|
|
|
|
end note
|
|
|
|
|
|
|
|
note right of StringHelper::isCJK
|
|
|
|
Checks if a string contains characters typically used in East Asian languages (Chinese, Japanese, Korean)
|
|
|
|
These languages do not typically use word boundaries in the same way as languages written in Latin script
|
|
|
|
|
|
|
|
return: bool
|
|
|
|
end note
|
|
|
|
|
|
|
|
note right of StringHelper::hasLength
|
|
|
|
Make sure a string has a length
|
|
|
|
|
|
|
|
return: bool
|
|
|
|
end note
|
|
|
|
|
|
|
|
@enduml
|
|
|
|
```
|
|
|
|
|
|
|
|
---
|
|
|
|
```
|
|
|
|
██╗ ██████╗██████╗
|
|
|
|
██║██╔════╝██╔══██╗
|
|
|
|
██║██║ ██████╔╝
|
|
|
|
██ ██║██║ ██╔══██╗
|
|
|
|
╚█████╔╝╚██████╗██████╔╝
|
|
|
|
╚════╝ ╚═════╝╚═════╝
|
|
|
|
```
|
|
|
|
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
|
|
|
|