# How to split all chars from string array

**URL:** <https://discourse.julialang.org/t/how-to-split-all-chars-from-string-array/45965>\
**Category:** General Usage\
**Tags:** strings\
**Created:** [September 2, 2020, 5:59pm UTC](https://discourse.julialang.org/t/how-to-split-all-chars-from-string-array/45965 "2020-09-02T17:59:21Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [September 2, 2020, 7:19pm UTC](https://discourse.julialang.org/t/how-to-split-all-chars-from-string-array/45965/4 "2020-09-02T19:19:07Z")

</div>

Don’t use `split(s, "")` to get “characters” — that returns 1-character strings, but Julia (unlike Python) has an actual character type. Use `collect` to get an array of characters.

(That being said, it’s rare to actually need to explicitly collect an array of characters during string processing — you can just loop over the characters directly. Unlike other dynamic languages, you don’t have to cram everything into “vectorized” operations to get good performance; often non-vectorized code is clearer and faster.)

---

_[View the full topic](https://discourse.julialang.org/t/how-to-split-all-chars-from-string-array/45965)._
