Get repetition of strings in Julia - ^ operator Last Updated : 12 Jul, 2025 Comments Improve Suggest changes Like Article Like Report The ^ is an operator in julia which is used to repeat the specified string with the specified number of times. Syntax: ^(s::Union{AbstractString, AbstractChar}, n::Integer) Parameters: s::Union{AbstractString, AbstractChar}: Specified strings or charactersn::Integer: Specified integer Returns: It returns a new repeated string. Example 1: Python # Julia program to illustrate # the use of operator ^ # Get repetition of different strings println("GFG " ^3) println("GeekforGeeks " ^2) println("abc " ^2) println("a " ^4) Output: GFG GFG GFG GeekforGeeks GeekforGeeks abc abc a a a a Example 2: Python # Julia program to illustrate # the use of operator ^ # Get repetition of different strings println("1-" ^3) println("123 " ^2) println("5& " ^2) println("0 * 0 " ^4) Output: 1-1-1- 123 123 5& 5& 0*0 0*0 0*0 0*0 Comment More infoAdvertise with us Next Article Operator Overloading in Julia K Kanchan_Ray Follow Improve Article Tags : Julia Similar Reads Get repetition of a string in Julia - repeat() Method The repeat() is an inbuilt function in julia which is used to return a string which is the repetition of specified string with specified number of times. Syntax: repeat(String::AbstractString, r::Integer) Parameters: String: Specified string or character r::Integer: Specified number of times Returns 2 min read Sorting of Strings in Julia Sorting of strings in Julia means that now we are sorting the characters of the string. In Julia, this can easily be achieved with the basic logic of getting each character of the string into a separate array and sorting the array. Lastly joining the array together to get the sorted array. Major tas 4 min read Get addition of strings in Julia using concatenate operator - * operator The * is an concatenate operator in julia which is used to concatenate different strings and/or characters into a single string. Syntax: *(s::Union{AbstractString, AbstractChar}, t::Union{AbstractString, AbstractChar}...) Parameters: Union{AbstractString, AbstractChar}: Specified strings or characte 1 min read Get size of string in Julia - sizeof() Method The sizeof() is an inbuilt function in julia which is used to return the size of the specified string i.e, returned size will be equal to the number of code units in the string multiplied by the size (in bytes) of one code unit. Syntax: sizeof(str::AbstractString) Parameters: s::AbstractString: Spec 1 min read Operator Overloading in Julia Operator overloading in Julia refers to the ability to define custom behavior for built-in operators such as +, -, *, /, etc. when applied to objects of custom types. This allows users to create intuitive and concise code that works with custom data types as if they were built-in. In Julia, operator 5 min read Storing Output on a File in Julia Julia provides a vast library to store and save the output in multiple file formats. We can store the output in various forms such as CSV(comma-separated value) or in Excel or just simply a text file. Storing Data on Text FileUsing open() function In order to store the data in a text file, we need t 4 min read Like