Scala – Class Object Function to Convert Multiline String to List Sequence Code Example

The code for Class Object Function to Convert Multiline String to List Sequence

object MultilineStringToList extends App {

    val list = Q("""
        http://angel.co/mile-high-organics
        http://angel.co/kindara
        http://angel.co/precog
        http://angel.co/pivotdesk
    """)

    list.foreach(println)
}

/*
which printed out this:
http://angel.co/mile-high-organics
http://angel.co/kindara
http://angel.co/precog
http://angel.co/pivotdesk
*/
Code by IncludeHelp, on August 03, 2022
Reference: alvinalexander.com

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.