Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to print without newline in swift 2.0

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 629
    Comment on it

    Hi Readers!

    In swift 2.0, print() statement adds a new line character automatically, where as in swift 1.2, println() and print() were 2 separate functions.

    Apple in 2.0 has given only 1 statement for print() with different parameters.

    To print it in same line you can use below statement:

    print("Hi", terminator:"")
    print(" there")
    

    The above 2 statement will bring the "Hi there" in one line.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: