ShamanHead

Untitled

Aug 12th, 2020
2,684
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. function space_jitter($position, $text) : int{
  2.     $text_len = strlen($text); //Длина текста
  3.     for($i = $position+1;$i < $text_len;$i++){
  4.         if($text[$i] != ' ') return $i; //Если текст не равен пробелу возвращаем номер не пробельного символа.
  5.     }
  6.     return false;
  7. }
Advertisement
Add Comment
Please, Sign In to add comment