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

15 Jun, 2019 06:58 PM
26 May, 2019 10:52 PM
02 May, 2019 04:56 PM
27 Apr, 2019 04:03 PM
26 Apr, 2019 12:46 PM

 

26 Apr, 2019 12:17 PM
26 Apr, 2019 12:16 PM
24 Apr, 2019 02:04 AM
31 Mar, 2019 10:32 AM
24 Mar, 2019 08:45 PM
24 Mar, 2019 12:07 AM