checkStringLength() public static method

public static checkStringLength ( $string, $max_len )
 public function setGreetingText($text)
 {
     return $this->api->callApi('me/thread_settings', ['setting_type' => 'greeting', 'greeting' => ['text' => MessengerUtils::checkStringEncoding(MessengerUtils::checkStringLength($text, 160), 'UTF-8')]]);
 }
 public function toArray()
 {
     //check all buttons for titles!
     return ['title' => MessengerUtils::checkStringLength($this->title, 80), 'item_url' => $this->item_url, 'image_url' => $this->image_url, 'subtitle' => MessengerUtils::checkStringLength($this->subtitle, 80), 'buttons' => MessengerUtils::checkArraySize($this->buttons, 3)];
 }