@@ -81,7 +81,7 @@ let updateInputLine = (terminal: t): unit => {
8181let listDirectory = (terminal : t , path : string , activeIp : string ): string => {
8282 switch Some (activeIp ) {
8383 | Some (ip ) =>
84- let fullPath = if Js . String2 . startsWith (path , "C:\\ " ) || Js . String2 .startsWith (path , "/" ) {
84+ let fullPath = if String . startsWith (path , "C:\\ " ) || String .startsWith (path , "/" ) {
8585 path
8686 } else {
8787 terminal .currentDirectory ++ "\\ " ++ path
@@ -137,7 +137,7 @@ let changeDirectory = (terminal: t, path: string, activeIp: string): string => {
137137 }
138138 ""
139139 } else {
140- let newPath = if Js . String2 .startsWith (path , "C:\\ " ) {
140+ let newPath = if String .startsWith (path , "C:\\ " ) {
141141 path
142142 } else {
143143 terminal .currentDirectory ++ "\\ " ++ path
@@ -159,7 +159,7 @@ let readFile = (terminal: t, fileName: string, activeIp: string): string => {
159159 switch Some (activeIp ) {
160160 | None => "cat: no device IP configured"
161161 | Some (ip ) =>
162- let fullPath = if Js . String2 .startsWith (fileName , "C:\\ " ) {
162+ let fullPath = if String .startsWith (fileName , "C:\\ " ) {
163163 fileName
164164 } else {
165165 terminal .currentDirectory ++ "\\ " ++ fileName
@@ -299,7 +299,7 @@ let handleBuiltInCommand = (terminal: t, cmd: string, args: array<string>): stri
299299 let hasForce = Belt .Array .some (args , arg => arg == "-f" || arg == "-rf" || arg == "-fr" )
300300
301301 // Get filename (skip flags)
302- let fileName = Belt .Array .getBy (args , arg => ! Js . String2 .startsWith (arg , "-" ))
302+ let fileName = Belt .Array .getBy (args , arg => ! String .startsWith (arg , "-" ))
303303
304304 switch fileName {
305305 | None => "rm: missing operand"
@@ -334,7 +334,7 @@ let handleBuiltInCommand = (terminal: t, cmd: string, args: array<string>): stri
334334 switch getActiveState (terminal ) {
335335 | None => "cp: no device state"
336336 | Some (activeState ) =>
337- let sourcePath = if Js . String2 .startsWith (sourceName , "C:\\ " ) {
337+ let sourcePath = if String .startsWith (sourceName , "C:\\ " ) {
338338 sourceName
339339 } else {
340340 terminal .currentDirectory ++ "\\ " ++ sourceName
@@ -782,7 +782,7 @@ Cross-VM: Use SEND to port "net:<ip>:<port>" to deliver data.`
782782 }
783783 | "chat" | "say" => {
784784 let message = Array .sliceToEnd (args , ~start = 1 )-> Array .join (" " )
785- if Js . String2 .length (String .trim (message )) > 0 {
785+ if String .length (String .trim (message )) > 0 {
786786 MultiplayerClient .sendChat (MultiplayerGlobal .client , ~message )
787787 ` [you] ${message}`
788788 } else {
@@ -930,10 +930,10 @@ let handleKeyInput = (terminal: t, key: string): unit => {
930930 terminal .currentInput = String .slice (
931931 terminal .currentInput ,
932932 ~start = 0 ,
933- ~end = Js . String2 .length (terminal .currentInput ) - 1 ,
933+ ~end = String .length (terminal .currentInput ) - 1 ,
934934 )
935935 updateInputLine (terminal )
936- } else if Js . String2 .length (key ) == 1 {
936+ } else if String .length (key ) == 1 {
937937 terminal .currentInput = terminal .currentInput ++ key
938938 updateInputLine (terminal )
939939 }
0 commit comments