# How does 'cull array' work?

**URL:** <https://forums.unrealengine.com/t/how-does-cull-array-work/393944>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE4, question, Blueprint\
**Created:** [May 18, 2017, 1:43pm UTC](https://forums.unrealengine.com/t/how-does-cull-array-work/393944 "2017-05-18T13:43:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Althaen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Althaen](https://forums.unrealengine.com/u/Althaen)\
**Post date:** [May 18, 2017, 1:43pm UTC](https://forums.unrealengine.com/t/how-does-cull-array-work/393944/1 "2017-05-18T13:43:40Z")

</div>

Came across this node:

![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/9/1/0918ed5e8717759e9bf05c425971246496f40ed7.png)

Documentation says “Takes an array of strings and removes any zero length entries.”

How is this supposed to work if the input is a single string and not an array?

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [May 18, 2017, 2:38pm UTC](https://forums.unrealengine.com/t/how-does-cull-array-work/393944/2 "2017-05-18T14:38:15Z")

</div>

That function seems to be badly exposed to BPs.

`FString::CullArray` is a static function, but the BP version is still taking a string instance to operate on (which it won’t mutate as the function is static), and takes the array as an in/out argument (which doesn’t really work with BPs).

The BP exposed function should probably be changed to take an array, internally make a copy, call `FString::CullArray` on the copy, and then return the result. I’ve raised UE-45185 to fix this 🙂

---

<div class="post-metadata">

**Author:** ![Jornexe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jornexe](https://forums.unrealengine.com/u/Jornexe)\
**Post date:** [November 1, 2022, 10:23am UTC](https://forums.unrealengine.com/t/how-does-cull-array-work/393944/3 "2022-11-01T10:23:05Z")

</div>

still an issue in UE5 🙃
