42 questions
Filter
- 0 votes1 answers10 views
How to remove all line breaks from a string
I have a text in a textarea and I read it out using the .value attribute. Now I would like to remove all linebreaks (the character that is produced when you press ...
- 0 votes1 answers29 views
How can I convert time and date with zero prefix by javascript ?
Hello developer, I have a time like 1:2:5 1/2/2020 and I want to convert it to 01:02:05 01/02/2020 How can I do it by javascript? Thanks!
- 2 votes1 answers41 views
How to remove HTML/XML tags from string?
Test Data: console.log(striphtmltags('Js Exercises')); // Js Exercises `
- 3 votes1 answers27 views
how to translate border-left-width to borderLeftWidth
That is: removes all dashes, each word after dash becomes uppercased. Examples: camelize("background-color") == 'backgroundColor'; camelize("list-style-image") ...
- 8 votes2 answers1K views
how to find query parameters from url ?
What is the correct way to get params from the URL as an object in JS? For example i have a https://stackdev.io/search?search=javascript, if I write getQueryParams(url), ...
- 2 votes1 answers22 views
How do you reverse all words in string in C#?
How do you reverse all words in string? For example string s="one two three"; your program should return "eno owt eerht"
- 3 votes1 answers146 views
how to correctly cut the text in javascript?
Let's suppose I have the following string const text = 'This text is too long, you need to cut it․'; I want to cut it not splitting the words and add ... in the ...
- 6 votes1 answers30 views
String in C#, string's behavior
The String is a collection of chars, why we can't change one char in a string?
- 0 votes2 answers25 views
What is the difference between `string` and `stringbuilder` in c#
What is the difference between string and stringbuilder in c
- 1 votes1 answers26 views
- 11 votes9 answers1.5K views
How do you reverse a string in JavaScript?
I need to reverse a string in javascript. I need a function like this։ function reverseString(str) { /* . . . . . . */ } reverseString("hello world") ...
- 0 votes0 answers11 views
What is the best way to check string equality using JavaScript?
I'm trying to find out the fastest way to check equality of the strings. I tried to do it with a regular expression and compare strings, but I cannot understand ...
- 0 votes0 answers15 views
How to convert an object to a string in JavaScript?
How do I convert a JavaScript object into a string? This is my example: var o = {a:1, b:2} .log(o) .log(‘Item: ‘ + o) Output: >// very nice readable output :) Object ...
- 0 votes1 answers18 views
Difference between String and StringBuilder c#.
What are the differences between System.String and System.Text.StringBuilder classes?
- 0 votes0 answers4 views
How to convert JavaScript string to be all lower case?
Is there any way to convert a string value to be in all lower case letters? For example: convert from this "Your Name" to this "your name" Thank you in advance.
- 0 votes0 answers8 views
How to trim string using JavaScript?
How can I trim a string using JavaScript? Any help will be appreciated.
- 1 votes1 answers12 views
How to check if a variable is a string in JavaScript?
How can I check if a variable's type is a string or something else in JavaScript? In my code, I'm receiving from function strings and numbers. I need to know their ...
- 0 votes0 answers6 views
How can I convert a string to a number using JavaScript?
How can I convert a string to a number using JavaScript?
- 0 votes0 answers5 views
How to generate string/characters randomly with JavaScript
I want to generate a five-character string randomly from the set [a-zA-Z0-9]. Can someONe give me an idea of this with JavaScript?
- 0 votes0 answers6 views
Double vs single quotes in JavaScript?
There are more and more JS libraries that are using single quotes when handling strings. What is the difference between them? I thought they're the same. console.log("double"); ...