Concat_List

john's Avatar

john

26 May, 2019 10:52 PM

Attached is a very simple custom node that fills a gap in NodeBox: concat_list

NodeBox has a way of turning a string into a list of substrings (the make_string node), but no way to do the reverse. You can concatenate up to seven individual substrings, but you can't concatenate an arbitrary list of substrings. This is something I need to do on a regular basis.

concat_list takes a list of strings with an optional delimiter (e.g. a comma or a space) and returns a single string. This custom node requires that concat_list.py be added to the code library of your network.

The example turns the first sentence of the Gettysburg Address into a list of words, sorts them, concatenates them, and displays them.

Frederick, if you are listening, this seems like it should be a built-in node.

Enjoy!

John

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • concat_list_screenshot.png 311 KB
  • concat_list.zip 2.21 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

21 Oct, 2019 08:01 AM
18 Oct, 2019 01:06 AM
10 Oct, 2019 01:11 AM
02 Oct, 2019 09:51 PM
30 Sep, 2019 08:21 AM

 

29 Sep, 2019 02:02 PM
03 Sep, 2019 01:35 AM
24 Aug, 2019 03:14 AM
08 Aug, 2019 04:13 AM
02 Aug, 2019 09:27 PM
18 Jul, 2019 10:05 AM