Pārlūkot izejas kodu

[nullSafety] adjust StringTools return types for charCodeAt

Rudy Ges 4 mēneši atpakaļ
vecāks
revīzija
4e22c49b87
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      std/StringTools.hx

+ 2 - 2
std/StringTools.hx

@@ -454,7 +454,7 @@ class StringTools {
 		This operation is not guaranteed to work if `s` contains the `\0`
 		character.
 	**/
-	public static #if !eval inline #end function fastCodeAt(s:String, index:Int):Int {
+	public static #if !eval inline #end function fastCodeAt(s:String, index:Int):Null<Int> {
 		#if neko
 		return untyped __dollar__sget(s.__s, index);
 		#elseif cpp
@@ -491,7 +491,7 @@ class StringTools {
 		This operation is not guaranteed to work if `s` contains the `\0`
 		character.
 	**/
-	public static #if !eval inline #end function unsafeCodeAt(s:String, index:Int):Int {
+	public static #if !eval inline #end function unsafeCodeAt(s:String, index:Int):Null<Int> {
 		#if neko
 		return untyped __dollar__sget(s.__s, index);
 		#elseif cpp