Scala Programming: Get a substring of a given string between two specified positions
Write a Scala program to get a substring of a given string between two specified positions.
Sample Solution:
Scala Code:
Sample Output:
Original = The quick brown fox jumps over the lazy dog. From said string, substring between two positions (10,26) = brown fox jumps
Scala Code Editor :
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Previous:Write a Scala program to replace a specified character with another character.
Next:Write a Scala program to convert all the characters to lowercase, uppercase strings.
What is the difficulty level of this exercise?