Skip to content

npegnatz/SwiftExpression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwiftExpression

A simple Swift package to safely evaluate mathematical expressions represented as strings. It leverages NSExpression for the evaluation and provides an additional layer of safety by catching any Objective-C exceptions that might occur during the evaluation process, preventing crashes.

Usage

let expression = Expression("10 + 2")
let result = expression.result()

About

Swift Package for safe NSExpression evaluation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published