File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Sources/LispKit/Primitives Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ public final class StringLibrary: NativeLibrary {
6969 self . define ( Procedure ( " string-replace! " , stringReplace) )
7070 self . define ( Procedure ( " string-replace-first! " , stringReplaceFirst) )
7171 self . define ( Procedure ( " string-insert! " , stringReplaceRange) )
72+ self . define ( Procedure ( " string-append! " , stringAppendEnd) )
7273 self . define ( Procedure ( " string-copy " , stringCopy) )
7374 self . define ( Procedure ( " string-copy! " , stringInsert) )
7475 self . define ( Procedure ( " string-fill! " , stringFill) )
@@ -463,6 +464,14 @@ public final class StringLibrary: NativeLibrary {
463464 str. replaceCharacters ( in: NSMakeRange ( start, end - start) , with: to)
464465 return . void
465466 }
467+
468+ func stringAppendEnd( _ expr: Expr , _ args: Arguments ) throws -> Expr {
469+ let str = try expr. asMutableStr ( )
470+ for arg in args {
471+ str. append ( try arg. asString ( ) )
472+ }
473+ return . void
474+ }
466475
467476 func stringCopy( _ expr: Expr , args: Arguments ) throws -> Expr {
468477 let str = try expr. asMutableStr ( )
You can’t perform that action at this time.
0 commit comments