1

Do I need Carriage Returns (not familiar with it)? Currently this is how my JavaScript string is being built:

allcars = cars + makes;

Unfortunately, when I get to my Split function call (that I rather should not change), it does not split my JavaString back apart into an array:

CarsList = Split(Request("allcars"),vbCrLf)

When the Split function call gets string coming from a different source, it splits such string correctly (unlike with string from my JavaScript function).

3
  • 1
    What is the content of cars? What is the content of makes? What result do you expect after the split? Please provide examples. Commented Sep 20, 2016 at 11:10
  • cars and makes are simple strings of characters. I expect them form an array after split. and I do not want to insert any splitter symbols. Wiktor's solutions fulfills my needs. Commented Sep 20, 2016 at 11:25
  • What you're trying to do doesn't work without inserting a delimiter. If you use CR-LF as that delimiter or some other character (or character sequence) doesn't matter, as long as this character or character sequence doesn't appear elsewhere in your strings. Commented Sep 20, 2016 at 11:30

1 Answer 1

1

The vbCrLf constant represents a sequence of CR (carriage return, \r) and LF (line feed, \n) symbols. So, use

allcars = cars + "\r\n" + makes;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.