mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-25 05:17:25 -04:00
add license, move folders
This commit is contained in:
parent
185cc74060
commit
271c4a46a1
132 changed files with 21 additions and 0 deletions
18
app/scripts/string_tools.gd
Normal file
18
app/scripts/string_tools.gd
Normal file
|
@ -0,0 +1,18 @@
|
|||
extends Node
|
||||
class_name StringTools
|
||||
|
||||
|
||||
static func to_alpha(text: String) -> String:
|
||||
var last_is_alpha = false
|
||||
var result = ""
|
||||
|
||||
for symbol in text:
|
||||
if (symbol >= 'a' and symbol <= 'z') or (symbol >= 'A' and symbol <= 'Z'):
|
||||
result += symbol
|
||||
last_is_alpha = true
|
||||
elif last_is_alpha:
|
||||
result += " "
|
||||
last_is_alpha = false
|
||||
|
||||
result = result.strip_edges()
|
||||
return result
|
Loading…
Add table
Add a link
Reference in a new issue