I have a function which returns me a value and its size that can set on calculative label width. After met certain condition I want to stop further procedure of recursion function like **break**. 

```
func getLength(value: Int, font: UIFont, viewFrame: CGRect) -> (width:CGFloat, text:String) {
    let width: CGFloat!
     var val = value

    let size = String(format:"%d",value).size(attributes: [NSFontAttributeName: font])
    if size.width+10 > viewFrame.size.width {
        width = viewFrame.size.width-10
        val = val/10
        _ = getLength(value: val, font: font, viewFrame: viewFrame)
        return (0.0 , "")

    } else {
        width = size.width+10
        return (width,String(format:"%d+",val))
    }
}

```