Jump to content
UBot Underground

Limiting number of characters in a variable


Recommended Posts

I have a table being populated by a bunch of variables, but the design is broken when it exceeds the total width allowed.

pretty standard issue for most people i'm sure.

 

Is there a way to delete all content in a variable after a set number or characters or replace it with something like ...

 

Link to post
Share on other sites

If I understand you correctly I think you are looking for "$substring"  function.

 

Here is a quick example:

set(#STRING Long, "long string", "Global")
set(#STRING Short, "{$substring(#STRING Long, 0, 4)}...", "Global")

  • Like 1
Link to post
Share on other sites

 

If I understand you correctly I think you are looking for "$substring"  function.

 

Here is a quick example:

set(#STRING Long, "long string", "Global")
set(#STRING Short, "{$substring(#STRING Long, 0, 4)}...", "Global")

exactly what I was looking for. thank you!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...