question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature] useConcatenate

See original GitHub issue

Clear and concise description of the problem

In my project I found myself to concatenate a quite large amount of string and found myself doing this multiple times;

const path = computed(() => corsProxy.value + gameURL.value)

Suggested solution

Like the useSum we could have a useConcatenate or allow useToString to have multiple params.

Alternative

There is really other alternative than the one I wrote at the start of this feature request.

Additional context

No response

Validations

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Bobakanooshcommented, Aug 27, 2022

It could use the same thing that useToString does internally, so that you can do:

useConcatenate([[1,2,3], () => 'myFunctionResult']);

or anything else that useToString supports.

1reaction
Bobakanooshcommented, Aug 27, 2022

I’d imagine usage for this would support all of the following

useConcatenate("string1", refString.value, refString);

const someRefArray = ref(["string1", refString.value, refString]);
useConcatenate(someRefArray)

I’d be willing to add this if the above API is approved

Read more comments on GitHub >

github_iconTop Results From Across the Web

CONCAT function - Microsoft Support
The CONCAT function combines the text from multiple ranges and/or strings, but it doesn't provide delimiter or IgnoreEmpty arguments.
Read more >
How to Use Concatenate in Excel [with Syntax and Examples]?
The word CONCATENATE means to join or combine. The CONCATENATE function in Excel is used to combine the text from different cells into...
Read more >
Excel Formulas: Using CONCATENATE to Combine Names
The word concatenate is just another way of saying "to combine" or "to join together". The CONCATENATE function allows you to combine text...
Read more >
How to CONCATENATE in Excel (Easy Tutorial)
Use CONCATENATE, CONCAT, TEXTJOIN or the & operator in Excel to concatenate (join) two or more text strings. 1. The CONCATENATE function below...
Read more >
CONCATENATE Function - Formula, Examples, How to Use it
The CONCATENATE Function is categorized under Excel Text Functions. The function helps to join two or more strings into one string.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found