Get a substring of specific size from end of a string in Julia – last() Method Last Updated : 26 Mar, 2020 Improve Improve Like Article Like Save Share Report The last() is an inbuilt function in julia which is used to return a string consisting of the last n characters of the specified string, where n will be passed as parameter. Syntax: last(s::AbstractString, n::Integer) Parameters: s::AbstractString: Specified string. n::Integer: Specified integer value. Returns: It returns a string consisting of the last n characters of the specified string, where n will be passed as parameter. Example 1: # Julia program to illustrate # the use of String last() method # Getting a string consisting of the last # n characters of the specified string println(last("GeeksforGeeks", 0)) println(last("GeeksforGeeks", 5)) println(last("GeeksforGeeks", 8)) println(last("GeeksforGeeks", 10)) Output: Example 2: # Julia program to illustrate # the use of String last() method # Getting a string consisting of the last # n characters of the specified string println(last("1 + 2+3 + 4", 0)) println(last("2-4-6-8", 4)) println(last("1 * 3*5 * 7", 6)) Output: Like Article Suggest improvement Previous Merging Dictionary collections in Julia - merge() and merge!() Methods Next Join an array of strings into a single string in Julia - join() Method Share your thoughts in the comments Add Your Comment Please Login to comment...