About 267,000 results
Open links in new tab
  1. Convert array of strings into a string in Java - Stack Overflow

    Apr 7, 2011 · Java 8+ Use String.join():. String str = String.join(",", arr); Note that arr can also be any Iterable (such as a list), not just an array.

  2. Convert string array to array in javascript - Stack Overflow

    I wanted to store an array as a data attribute in an HTML element so that I could use it later in the JS. However, such an HTML attribute could only be stored as a string. To solve this... First I …

  3. string to string array conversion in java - Stack Overflow

    Jun 5, 2020 · To continue this train of thought, you could then convert the char array to a String array: String[] stringArray = new String[charArray.length]; for (int i = 0; i < charArray.length; …

  4. c# - convert string array to string - Stack Overflow

    Jan 30, 2011 · In the accepted answer, String.Join isn't best practice per its usage. String.Concat should have be used since OP included a trailing space in the first item: "Hello " (instead of …

  5. How to convert array into comma separated string in javascript

    Sep 29, 2016 · Array.prototype.join() The join() method joins all elements of an array into a string.. Arguments: It accepts a separator as argument, but the default is already a comma ,

  6. Best way to convert an ArrayList to a string - Stack Overflow

    Mar 1, 2009 · I needed to create collections of strings with rarely populated elements, with random numbers. At the end I needed a string, not an array not array to string. This is my code : …

  7. c# - How to convert byte array to string - Stack Overflow

    Nov 23, 2016 · string convert = "This is the string to be converted"; // From string to byte array byte[] buffer = System.Text.Encoding.UTF8.GetBytes(convert); // From byte array to string …

  8. Converting 'ArrayList<String> to 'String []' in Java - Stack Overflow

    Oct 28, 2010 · List<String> list = ..; String[] array = list.toArray(ArrayUtils.EMPTY_STRING_ARRAY); // or if using static import String[] array = …

  9. c++ - How to convert a char array to a string? - Stack Overflow

    Jan 22, 2012 · A bit <O/T> based on the OP, but I googled "c++ convert std::array char to string" and it brought me here, yet none of the existing answers deal with std::array<char, ..>: …

  10. ios - How do I convert a Swift Array to a String? - Stack Overflow

    if you want convert custom object array to string or comma separated string (csv) you can use var stringIds = (self.mylist.map{$0.id ?? 0}).map{String($0)}.joined(separator: ",") credit to : urvish …

Refresh