mirror of
https://github.com/awslabs/aws-crt-php.git
synced 2026-08-18 01:57:13 +00:00
php qol Sam asked for (#44)
Co-authored-by: Itamar Levy-Or <[email protected]>
This commit is contained in:
co-authored by
Itamar Levy-Or
parent
e5ffe9d63d
commit
e4f5b52d6a
@@ -29,6 +29,9 @@ final class Encoding {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static function encodeString($str) {
|
public static function encodeString($str) {
|
||||||
|
if (is_array($str)) {
|
||||||
|
$str = $str[0];
|
||||||
|
}
|
||||||
return pack("Na*", strlen($str), $str);
|
return pack("Na*", strlen($str), $str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user