Get a substring of specific size from end of a string in Julia - last() Method Last Updated : 26 Mar, 2020 Comments Improve Suggest changes Like Article Like 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: Python # 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: Python # 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: Comment More infoAdvertise with us Next Article Get a substring of specific size from end of a string in Julia - last() Method K Kanchan_Ray Follow Improve Article Tags : Julia Similar Reads Get a substring of specific size from starting of a string in Julia - first() Method The first() is an inbuilt function in julia which is used to return a string consisting of the first n characters of the specified string, where n will be passed as parameter. Syntax: first(s::AbstractString, n::Integer) Parameters: s::AbstractString: Specified string. n::Integer: Specified integer 1 min read Get a substring of specified length from a string in Julia - SubString() Method The SubString() is an inbuilt function in julia which is used to return a part of the specified parent string s within range i:j or r, where i, j and r is given as the parameter. Syntax: SubString(string::AbstractString, i::Integer, j::Integer) or SubString(string::AbstractString, r::UnitRange) Para 2 min read Splitting string into array of substrings in Julia - split() and rsplit() Method The split() is an inbuilt function in julia which is used to split a specified string into an array of substrings on occurrences of the specified delimiter(s). Syntax: split(str::AbstractString, dlm; limit::Integer, keepempty::Bool) or split(str::AbstractString; limit::Integer, keepempty::Bool) Para 2 min read Remove end characters from strings in Julia - strip(), lstrip() and rstrip() Methods The strip() is an inbuilt function in julia which is used to remove leading and trailing characters from the specified string str. These removing elements is specified by given characters chars. Syntax: strip(str::AbstractString, chars) Parameters: str::AbstractString: Specified string. chars: Speci 2 min read Get the last occurrence of the specified string pattern in Julia - findlast() Method The findlast() is an inbuilt function in julia which is used to return the last occurrence of the specified pattern in specified string. Syntax: findlast(Pattern::AbstractString, String::AbstractString) Parameters: Pattern: Specified pattern to be searched String: Specified string Returns: It return 1 min read Like