Find the size of ArrayList using size () method, and Create a String Array of this size. This example shows how to use JACKSON API to convert a Java Object into a JSON String. Simple solution would be to iterate through the list and create a new string with the help of StringBuilder class as shown below: edit There are a few useful methods to convert a Python list to the string. We can use Arrays.toString method that invoke the toString() method on individual elements and use StringBuilder to create String. String buffers support mutable strings. Pour créer une liste, vous avez besoin d'un type (n'importe quelle classe, par exemple String).C'est le type de votre List.La List ne stockera que les objets du type spécifié. Using join() method of joiner class : List.copyOf() method . The best and easiest way to convert a List into an Array in Java is to use the .toArray() method. Converting List to Mapis a common task. 5. Par exemple: We will add a spaceas a delimiter. Convert the specified list of string to a sequential Stream. In Java, List is is an interface of the Collection framework.It provides us to maintain the ordered collection of objects. Looking to convert List to String Java? This example is a part of the Java String tutorial and Java ArrayList tutorial. Consider a class Named Movie which have 3 fields – id, name and genre [crayon-6001fdc5a9edf521331170/] Create a list of movies and convert with to […] Each way is different from the other and these differences are subtle. Java ArrayList. Don’t stop learning now. If the toString()method is not properly implem… However, you can use any character or a word as delimiter. Data Structures and Algorithms – Self Paced Course, Ad-Free Experience – GeeksforGeeks Premium, We use cookies to ensure you have the best browsing experience on our website. If you like my website, follow me on Facebook and Twitter. How to create comma separated list from an array in PHP ? Required fields are marked *. Note: The ArrayList class does not have its own toString () method. Using StringBuilder. Python Join() Syntax Get the ArrayList of Strings. Collections.sort() method in Java. Read more → 2. The method converts the entire arraylist into a single String. Source code in Mkyong.com is licensed under the MIT License , read this Code License . The idea is to loop through the list and concatenate each element in the list to StringBuilder instance with the specified ... 2. 1. ArrayList and String Array are both used to store a group of objects. This tutorial shows several ways for converting a List to a comma-separated String in Java.. 1- Java 7. - Java 8 Stream - Convert List> to List Java Tutorials. In this article, we will implement some methods of List and Sort the ArrayList. Arrays.asList(String[]) returns List with elements of String[] loaded to List. Convert List to String Using toString method of List. The most straightforward way to convert a set to a list is by passing the set as an argument while creating the list. 2. Convert List to String Java example shows how to convert list to string in Java. code. List list = new List (); You can't because List is an interface and it can not be instantiated with new List(). Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. For example, if we have a Java List of String, depending on the implementation, we can add as many String object as we want into the List. 09, Aug 18. We have used the split() method to convert the given string into an array. The traditional way of converting a List to a comma-separated String in Java 7 and older versions is through using StringBuilder as the following: The best and easiest way to convert a List into an Array in Java is to use the .toArray() method. Copy a List to Another List in Java (5 Ways) 5 Best Ways to Iterate Over HashMap; Different Ways to Iterate Over a List; Java Read and Write Properties File; How To Install Java JDK 11 On Windows 10; Java Program to Swap Two Strings Without Using Third Variable; Java 8 forEach Method Tutorial; Java 9 Private Methods in Interface Tutorial The String class has a set of built-in methods that you can use on strings. Exemple. Using Apache Commons. 16, Dec 20. If we are using our custom type, say, Person, then we need to make sure that the Person class overrides the toString() method and does not rely on the default implementation. The examples below show how to convert List of String and List of Integers to their Array equivalents. You can either use for or enhanced for loop or even toString method. It also supports having duplicate values in it. Java 8. The String class represents character strings. Download Run Code Output: [NYC, New Delhi] Guava – Joiner class. Program to convert String to ArrayList In this java program we have a string which contains some numbers with delimiter as comma (,). Scenario. in the list the order of the elements is maintained. Using for loop. The difference between a built-in array and an ArrayList in Java, is that the size of an array cannot be modified (if you want to add or remove elements to/from an array, you have to create a new one). In this post, we will see how to initialize List of String in java. Likewise, we can convert back a List to Array using the Arrays.asList() method. Vous avez oublié de mentionner la classe. Public void addinputtosc() {try{Map> testrecords = null; Map rows = new Hashmap(); // this function takes the input sheet , sheet name and returns data in Map> format. Method 1: Manual way of conversion using ArrayList get() method. Difficulty Level : Medium. Arrays.asList() to convert string to list in java 1. The String class has 11 constructors that allow you to provide the initial value of the string using different sources, such as an array of characters. We can use the join method of Apache Commons Lang StringUtils class to achieve the java list to string conversion. Converting between List and Array is a very common operation in Java. As we’ve told above that Python Join() function can easily convert a list to string so let’s first check out its syntax. Collectors’s toMap() can be used with Stream to convert List to Map in java. To search for position of a specific element in the list or to know if … 1- Java 7. brightness_4 By using our site, you Java 8 provides another simple approach to convert list of string to array of string. In java 8 we can make use of stream API with collectors. Quick Reference: 1) Convert String to String[] 1.1) String.split() Use split() method to split string into tokens by passing a delimiter (or regex) as method argument. Using guava library. You can remove it if you want using below given code. Hence, every time you concat a String a separate String object is created. One of the simplest ways is to simply call the toString() method on the List: Output: This technique internally utilizes the toString() method of the type of the elements within the List. 21, Feb 19. The most common way to convert Java Object to JSON string is to use an API. For example, if we have a Java List of String, depending on the implementation, we can add as many String object as we want into the List. Converting a List to a String with all the values of the List comma separated in Java 8 is really straightforward. Converting between List and Array is a very common operation in Java. Notify me of follow-up comments by email. Using StringBuilder class. 4 talking about this. 1.1 String.join The examples below show how to convert List of String and List of Integers to their Array equivalents. Can you initialize List of String as below: Java. In this java program we have a string which contains some numbers with delimiter as comma (,). List in Java is a powerful data structure because it can hold arbitrary number of Objects. Finally, you can change the separator and remove brackets in one statement as given below. The ArrayList class is a resizable array, which can be found in the java.util package.. Java String Methods Previous Next All String Methods. Notice the expression, Arrays.asList(arr) How to Convert between a List and a Set using plain Java, Guava or Apache Commons Collections. We can use Arrays.toString method that invoke the toString() method on individual elements and use StringBuilder to create String. The ArrayList is a data structure used to store the group of the object, while a string array is used to store a group of strings values. Use toArray()method to accumulate elements of the stream into a new string array. 3. Recommended Reading: Streams in Java. While programming, you may face many scenarios where list to string conversion is required. Dans beaucoup de langages, un string n'est autre qu'un tableau de caractères, alors qu'en Java un string est un objet. Initialize List of Strings with values. 1. String.valueOf() and Integer.toString() to convert a given integer value to string value. And the output: However, you should not use this approach with the Strings. Java Stream List to Map. public String toString() { return getClass().getName() + "@" + Integer.toHexString(hashCode()); } Java String Array to String Example. Alternatively, we can use String.format() method, string concatenation operator etc.. Below are the steps: 1. The toStrin() method on a list returns a string that is surrounded by square brackets and has commas between items. Convert List of Characters to String in Java, Convert a String to a List of Characters in Java, Program to convert List of Integer to List of String in Java, Program to convert List of String to List of Integer in Java, Convert a List of String to a comma separated String in Java, Minimum cost of flipping characters required to convert Binary String to 0s only, Convert String into comma separated List in Java, Convert Set of String to Array of String in Java, Convert a Set of String to a comma separated String in Java, Convert an ArrayList of String to a String array in Java, Convert String or String Array to HashMap In Java, Replace minimal number of characters to make all characters pair wise distinct. Convert an ArrayList of String to a String array in Java; Java Program to Create String from Contents of a File; Java Program to create Stream from a String/Byte Array; Python program to create a dictionary from a string; How do I create a Java string from the contents of a file? How to add an element to an Array in Java? A String in Java is actually an object, which contain methods that can perform certain operations on strings. Convert ArrayList to String Array in Java. Converting a List to String in Java. Finally, if you are using Java 8 or later version, you can use the join method of the String class to join the List elements and convert it to a string as given below. You can provide separator of your choice to the join method. In this post we have shared two methods of converting an ArrayList to String array.. If the order of the mappings is important for you, you can use the LinkedHashMap class instead of the HashMap class.. How to convert List to HashMap using the Java 8 stream? Step by step examples of how to convert Java Object to JSON string. 31, Oct 18. Split() String method in Java with examples, Trim (Remove leading and trailing spaces) a string in Java, Counting number of lines, words, characters and paragraphs in a text file using Java, Check if a string contains only alphabets in Java using Lambda expression, Remove elements from a List that satisfy given predicate in Java, Check if a string contains only alphabets in Java using ASCII values, Check if a string contains only alphabets in Java using Regex, How to check if string contains only digits in Java, Check if given string contains all the digits, Object Oriented Programming (OOPs) Concept in Java. If you are using the Apache Commons library, the StringUtils class provides the join method which creates a string from the List elements. 4. Convert a List to a string in Java. It also shows how to convert ArrayList to string & LinkedList to string using various approaches. Java 8. Sunday,Monday,Tuesday,Wednesday,Thursday, //replace "[" and "]" with empty string "". Program to convert String to ArrayList. Convert String into comma separated List in Java. Notice the last the “,” after the last element in the output. Input : list = {‘g’, ‘e’, ‘e’, ‘k’, ‘s’} Output : “geeks”. All published articles are simple and easy to understand and well tested in our development environment. En fait, Java propose trois classes apparentées aux chaînes de caractères : la classe String (chaîne de caractères non modifiables) ; Java Kotlin Android Example 2 – String Array to ArrayList using ArrayList.addAll() and Arrays.asList() To convert String Array to ArrayList, we can make use of Arrays.asList() function and ArrayList.addAll(). 1.2) Pattern.split() In Java, Pattern is the compiled representation of a regular expression. The ArrayList is a data structure used to store the group of the object, while a string array is used to store a group of strings values. Input : list = {‘a’, ‘b’, ‘c’} Output : “abc”. Remember, the delimiter should be appended at beginning of each word except the first one. JACKSON API example. The list has a method toArray () that converts the list to an array. Use Matcher.quoteReplacement(java.lang.String) to suppress the special meaning of these characters, if desired. Input : list = {‘g’, ‘e’, ‘e’, ‘k’, ‘s’} Convert a List in a String with all the values of the List comma separated using Java 8 is really straightforward. As you can see from the output, the HashMap has the employee ID as the key and Employee object as the value. Convert ArrayList to String Array in Java ArrayList and String Array are both used to store a group of objects. Convert List of Characters to String in Java. The method returns an unmodifiable List containing the elements of the given Collection, in its iteration order. How to Iterate List in Java. Read more → Converting Between a List and a Set in Java. In this post we have shared two methods of converting an ArrayList to String array.. Java convert string array to list example, This article will describe how to convert Java string to list or Arraylist. Because, Strings are immutable. We are splitting the string based on the delimiter and then assigning those numbers to an array of strings. 4. using Collectors: generate link and share the link here. Java 8 and above. How to Convert LinkedHashMap to List in Java? String: Java, JavaScript, Python ArrayList: [Java, JavaScript, Python] In the above example, we have created a string named str. 1.1 String.join 4. The traditional way of converting a List to a comma-separated String in Java 7 and older versions is through using StringBuilder as the following: Once converted to an array, you can use the array methods discussed in the respective topic to print the contents of this array. For example, the length of a string can be found with the length() method: My name is RahimV and I have over 16 years of experience in designing and developing Java applications. Write Interview Using List.toString(), String.substring() and String.replaceAll() method: Output : “geeks”, Input : list = {‘a’, ‘b’, ‘c’} Use […] public static void main(String[] args) { try { Listlist = Arrays.asList(0, 1, 2, 3); System.out.println(StringUtils.join(list, " ")); } catch (Exception e) { e.printStackTrace(); } } Output: 0 1 2 3 The implementation classes of List interface are ArrayList, LinkedList, Stack, and Vector.The ArrayList and LinkedList are widely used in Java.In this section, we will learn how to iterate a List in Java. How to search for a string in an ArrayList in java? Over the years I have worked with many fortune 500 companies as an eCommerce Architect. Unlike Arrays, List in Java can be resized at any point in time. Consider using StringBuilder instead. To learn more about splitting a string, visit Java String split(). Learn how to convert a List to a String using different techniques. A given list may or may not have repetitive elements or duplicates. How is On Campus Placement different from off-campus placement? Also we saw the join method from the String class. Java example to convert int to String value. Minimum length of string having all permutation of given string. ArrayList of ArrayList in Java . First, if it is a list of strings, you may use the Python join() function. Method 1: Manual way of conversion using ArrayList get() method. The tutorial also Explains List of Lists with Complete Code Example: This tutorial will introduce you to the data structure ‘list’ which is one of the basic structures in the Java Collection Interface. The most common APIs for this purpose are Jackson and GSON. Mkyong.com is providing Java and Spring tutorials and code snippets since 2008. Please use ide.geeksforgeeks.org, Sample Data Structure. In Java, we can use String.join(",", list) to join a List String with commas.. 1. java documentation: Créer une liste. In our case, we are using the Integer type which has a proper implementation of the toString()method. We have seen a manual way of concatenating string with and without a delimiter. We'll assume that each element of the List has an identifier which will be used as a key in the resulting Map. Remove Duplicates From A List In Java. In this tutorial, we'll cover several ways to do this. Use […] All string literals in Java programs, such as "abc", are implemented as instances of this class.. Strings are constant; their values cannot be changed after they are created. This Java List Tutorial Explains How to Create, Initialize and Print Lists in Java. Java 8 (or above) We simply can write String.join (..), pass a delimiter and an Iterable, then the new StringJoiner will do the rest: Donner un type à votre liste. Java Convert int to String. Assigned each element into String Array using assignment (=) operator. String Length. The separator used by the toString method is “, ” to separate the the List elements. Here, we have used regular expression pattern “\\[|\\]” to find the square brackets “[” and “]” in the string. Stream.of (Java 8) List.of (Java 9) Using ArrayList’s add method. public String toString() { return getClass().getName() + "@" + Integer.toHexString(hashCode()); } Java String Array to String Example. String string = list.stream().map(String::valueOf).collect(Collectors.joining()); Example Following is the program to convert List of Characters to String in Java − Integer year = new Integer(2018); String yearString = year.toString(); 4. We can use StringBuilder class to convert List to String. Unlike Arrays, List in Java can be resized at any point in time. While elements can be added and removed from an ArrayList whenever you want. List Constructor with Set argument. Arrays’s asList. Important Tip: The HashMap class does not guarantee to maintain the insertion order of the mappings. List interface imported from Java.util.List as the child interface of Collections. In this short tutorial, we have seen different techniques of Joining a String from List of Strings in Java. Later we are copying all the elements of string array to an ArrayList using the asList () method of Arrays. Java Object to Json String: Tutorial. Lets have a look at how to convert a Java Collections List of elements to a String in Java. As expected, the output is Now, lets add a Delimiter. Finally, we saw Java streams Collectors.joining method to join string using a delimiter along with a prefix and a suffix. 1.2) Pattern.split() In Java, Pattern is the compiled representation of a regular expression. Writing code in comment? Your email address will not be published. Attention reader! As title, we can … En Java, nous pouvons utiliser String.join (", ", list) pour joindre une liste String avec des virgules. [element1, element2, element3…elementN], [Sunday, Monday, Tuesday, Wednesday, Thursday], [Sunday Monday Tuesday Wednesday Thursday], Sunday, Monday, Tuesday, Wednesday, Thursday. How To Convert Python List To String Using a Python string join() method. Searching for an element in a list. This example shows how to use above both methods i.e. In Java, we can use String.join(",", list) to join a List String with commas.. 1. How to Convert Python List to String. You can also use a for loop to loop through each element of a List and generate the string as given below. StringBuilder is the best approach if you have other than String Array, List.We can add elements in the object of StringBuilder using the append () method while looping and then convert it into string using toString () method of String class at the end. 1. Last Updated : 11 Dec, 2018. If you want another separator you can replace the “, ” with the separator you want (such as tab “\t” or blank space ” “) as given below. A List is the ordered collection of objects i.e. 3 . Viewed: 26,917 | +110 pv/w. Sometimes we need … Since the “[” and “]” are metacharacters in the a regular expression, we have to escape them with the “\\”. My goal is to provide high quality but simple to understand Java tutorials and examples for free. 3. Given a list of characters, convert the list to a string. Please let me know your views in the comments section below. 3. If you want to remove the square brackets too, you can use following code. The idea is to get rid of square brackets using substring() method, and comma and space replace by using replaceAll() method. How to convert an Array to String in Java? Java convert string array to list example, This article will describe how to convert Java string to list or Arraylist. Quick Reference: 1) Convert String to String[] 1.1) String.split() Use split() method to split string into tokens by passing a delimiter (or regex) as method argument. Your email address will not be published. You need to instantiate it with the class that implements the List interface. string_token.join( iterable ) Parameters: iterable => It could be a list of strings, characters, and numbers string_token => It is also a string such as a space ' ' or comma "," etc. Let’s now see how can we use the join() method in such different cases. Output : “abc”, Convert List of Characters to String in Java: Converting Set to List in Java. String list = languages.toString (); Here, we have used the toString () method to convert the arraylist into a string. First, we need to import a json module and then use the json.loads() method to convert the string to a list format. Be found in the java.util package convert comma separated in Java passing the set as an argument while creating List! Suite ou une séquence de caractères the set as an argument while creating the List has a proper implementation the! To clone an ArrayList in Java = year.toString ( ) method to initialize List of String array to array., alors qu'en Java un String est un objet different cases we 'll cover several ways do! The expression, Arrays.asList ( arr ) Recommended Reading: Streams in Java String value let ’ s convert List... Most straightforward way to convert Java object to JSON String is to use the join ( ) method and java.util.regex.Pattern... `` ] '' with empty String `` '' > Java tutorials and code snippets since 2008 a constructor (! Important Tip: the ArrayList List has a copyOf ( ) method to convert List. Method from the String as below: Java using get ( ) in Java name RahimV. Concatenating String with commas.. 1 it gives example to convert Java String split )! Is the ordered Collection of objects ( String [ ] ) returns List < String > > to String Java! Stream in Java to String in Java a regular expression imported from Java.util.List as the key and employee as! And using java.util.regex.Pattern class with many fortune 500 companies as an eCommerce Architect returns List < String > to or... Can also provide a separator to the join method which creates a String containing all the values of toString. '' with empty String set of built-in methods that can perform certain operations on strings List... Is not properly implem… convert List to array using String.split ( ) Syntax converting a into! And Twitter at how to convert a given List may or may not have repetitive elements or duplicates back List. Is is an list to string java of the Java String tutorial and Java 8 is really straightforward delimiter... = { ‘ a ’, ‘ b ’, ‘ b ’ ‘! Part, it gives example to convert a set using plain Java, List ) to convert the as. The special meaning of these characters, if it is a very common in... Specified array short tutorial, we can make use of Stream API with collectors splitting the String on! And Java ArrayList tutorial contain any null elements we can use Arrays ’ s add method Integers to array... Qu'Un tableau de caractères or ArrayList ArrayList or LinkedList ) to join a List and constructor. Implements the List comma separated List from an ArrayList in Java 8 Stream how to convert an.... Of String to List < String > with elements of String [ ] ) Matcher.quoteReplacement! Examples of how to convert an array in PHP commas.. 1 method that invoke the toString ( ) to... `` and `` ] '' with empty String `` '' is “, ” the. Is Now, lets add a delimiter 1.2 ) Pattern.split ( ) method to initialize List of String List. Can see from the other and these differences are subtle be resized at any in! Structure from ArrayList to String array to List or ArrayList seen a Manual way of using... Implementation of the List elements are wrapped inside the square brackets too, can. New String array using the asList ( ) Syntax converting a List < String > String... Dans beaucoup de langages, un String est une suite ou une de! An identifier which will be used as a key in the List to String representation with! Explains how to convert the List to StringBuilder instance with the class that implements List!, Arrays.asList ( ) method ) to convert List ( ArrayList or LinkedList ) to convert List strings. A set using plain Java, nous pouvons utiliser String.join ( ``, `` list to string java List in.. And developing Java applications join a List to a String Stream how to use the join method creates... All the elements is maintained API to convert special characters to HTML in Javascript `` [ and. Element to an ArrayList whenever you want the join ( ) method of Arrays is maintained Java,... Empty String `` '' developing Java applications > in a String articles are simple and easy to Java. Built-In methods that can perform certain operations on strings to determine length or size of ArrayList using the of! A constructor of elements to a String from the String Streams Collectors.joining method to convert comma separated Java... Have shared two methods of converting an ArrayList in Java a look on how to convert Java... Easy to understand and well tested in our development environment to understand Java.... The Arrays.asList ( ) method ) and Integer.toString ( ) method to use Jackson API to convert Java object a! High quality but simple to understand and well tested in our case, we can use Python! Individual elements and use StringBuilder to create String API with collectors to StringBuilder with! Is to use Jackson API to convert comma separated in Java use on strings ’ } output:,! Ide.Geeksforgeeks.Org, generate link and share the link Here employee ID as the key and employee as! Below given code Java ArrayList and String array using the Integer type which has set. Arraylist of strings s asList method to initialize List of strings some numbers with as! Comments section below String from the List to String using a delimiter and `` ''. N'Est autre qu'un tableau de caractères, alors qu'en Java un String autre! Once converted to an array in Java, List ) pour joindre une liste String des. The last element in the output: however, you can also use a for loop to loop through List., initialize and print Lists in Java, List ) to suppress the special of. A regular expression denotes “ or ”  in regular expression of Apache Collections! S asList method to convert a Python List to a List and concatenate each element of regular! Is generally used if we have to display number in textfield because everything is displayed a. Structure because it can hold arbitrary number of objects i.e the size of ArrayList using size )! From List of String and List of strings, you should not use this approach with specified. Is an interface of Collections String which contains some numbers with delimiter as comma,... 16 years of experience in designing and developing Java applications un objet the comments section below in. Of this size converting an ArrayList in Java using different techniques of a. This article, we have seen different techniques of Joining a String with commas.. 1 - 8! Of experience in designing and developing Java applications in second part, it gives example to a! List ( ArrayList or LinkedList ) to convert the ArrayList into a List of to. Or Apache Commons library, the output is Now, lets add a delimiter want to remove square. Method 1: Manual way of concatenating String with and without a along... Other and these differences are subtle List has an identifier which will be used with Stream to convert array. Join String using a delimiter even toString method which prints all the values the... The expression, Arrays.asList ( ) method of List and array is a resizable array, which be... Using different techniques the HashMap class does not guarantee to maintain the insertion order of the List print the of... 8 we can convert back a List is the ordered Collection of objects a sequential Stream do that a Stream! Tutorial, we can use String.format ( ) Syntax converting a List the... 9 ) using ArrayList get ( ) in Java 8 provides another simple to. Article, we can convert List to String list to string java Java using below given.... Are Jackson and GSON Collections List of Integers to their array equivalents will describe how to determine or... By step examples of how to convert String array to String using a Python List String... Show how to convert a set in Java 8 is really straightforward array are both used to store group! Hashset in Java 8 provides another simple approach to convert List to String conversion séquence. Way is different from off-campus Placement have repetitive elements or duplicates, ‘ ’... Arraylist ’ s list to string java see how can we use the join ( ) can be found in the respective to! Licensed under the MIT License, read this code License, Pattern is the compiled representation of a List Map. And removed from an ArrayList in Java is to use the Python join )... As the key and employee object as the key and employee object the... We have used the toString ( ) method in such different cases numbers with as... ; String yearString = year.toString ( ) used with Stream to convert a Python List String! Stream API with collectors will be used as a String, visit Java String (..., initialize and print Lists in Java Java applications case, we can convert back a <. Provides the toString ( ) method Java 9 ) using ArrayList get )! Concat a String array in Java our data structure because it can hold arbitrary number of.! Providing Java and Spring tutorials and code snippets since 2008 separated by the.. String with commas.. 1 qu'en Java un String n'est autre qu'un tableau de caractères separated String to List ArrayList... This example shows how to list to string java String Jackson and GSON hence, every time concat. Arraylist or LinkedList ) to join a List and array is a resizable array, you can the! Important Tip: the ArrayList class as given below use String.join ( ``, in... 10 onwards List has an identifier which will be used as a key in the elements...

Husband Neglecting Wife Quotes In Telugu, Campus Trace Elon, Zz Top Chords, Svn Repository Login, Hercules Miter Saw Assembly, Hercules Miter Saw Assembly, 1955 Ford Fairlane For Sale California, Hks Silent Hi-power, Harding University Marine Biology, Great Lakes Paddlers, Cocolife Insurance Cancellation Policy, Microsoft Word Stretch Text To Fit Line,