File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 66
77 Copyright (c) 2005-2020 Kestrel Technology LLC
88 Copyright (c) 2020 Henny B. Sipma
9- Copyright (c) 2021-2024 Aarno Labs LLC
9+ Copyright (c) 2021-2025 Aarno Labs LLC
1010
1111 Permission is hereby granted, free of charge, to any person obtaining a copy
1212 of this software and associated documentation files (the "Software"), to deal
@@ -91,6 +91,15 @@ let has_control_characters (s: string): bool =
9191 ! found
9292
9393
94+ let startswith (s : string ) (substr : string ): bool =
95+ let lens = String. length s in
96+ let lensub = String. length substr in
97+ if lens < lensub then
98+ false
99+ else
100+ (String. sub s 0 lensub) = substr
101+
102+
94103let hex_string (s : string ): string =
95104 let ch = IO. input_string s in
96105 let h = ref " " in
Original file line number Diff line number Diff line change 66
77 Copyright (c) 2005-2020 Kestrel Technology LLC
88 Copyright (c) 2020 Henny B. Sipma
9- Copyright (c) 2021-2024 Aarno Labs LLC
9+ Copyright (c) 2021-2025 Aarno Labs LLC
1010
1111 Permission is hereby granted, free of charge, to any person obtaining a copy
1212 of this software and associated documentation files (the "Software"), to deal
@@ -38,6 +38,8 @@ val string_nsplit: char -> string -> string list
3838
3939val has_control_characters : string -> bool
4040
41+ val startswith : string -> string -> bool
42+
4143val byte_to_string : int -> string
4244
4345val value_from_byte : int -> int
You can’t perform that action at this time.
0 commit comments