I recommend the `^` operator. The `^` operator works in all bracket expressions.
    
    
    proc main() =
      var test = "Hello World"
      echo test[5 .. ^1]
      # this is transformed by the compiler to this expression
      echo test[5 .. (len(test)-1)
      # 1 here can be any symbol and any expression
      echo test[5 .. ^(test.len-test.high)]
      # and test can also be any symbol. It's a simple rewrite rule.
    
    
    main()
    

Reply via email to