string Questions

13

Solved

I'm looking for something to achieve the following: String s = "hello {}!"; s = generate(s, new Object[]{ "world" }); assertEquals(s, "hello world!"); // should be tru...
Length asked 28/6, 2013 at 12:20

6

Solved

I have a string, say a = "Show details1\nShow details2\nShow details3\nShow details4\nShow details5\n" How do we split the above with the delimiter \n (a newline)? The result should be [...
Reexamine asked 19/1, 2010 at 14:38

4

Solved

In Delphi 2007 you can store a UTF-8 string in a WideString and then pass that onto a Win32 function, e.g. var UnicodeStr: WideString; UTF8Str: WideString; begin UnicodeStr:='some unicode text'...
Binns asked 23/4, 2010 at 10:38

3

Solved

I've this sample program of a step that I want to implement on my application. I want to push_back the int elements on the string separately, into a vector. How can I? #include <iostream> #...
Dormeuse asked 18/1, 2009 at 17:11

2

Solved

I just found that xcode/clang does not allow to construct a std::string_view from a char* nullptr. I would expect that this sets size() to 0 and returns a null for data(), and this is how also how ...
Heeheebiejeebies asked 11/11, 2017 at 17:16

7

Solved

I'm trying to adapt this: Insert commas into number string to work in dart, but no luck. either one of these don't work: print("1000200".replaceAllMapped(new RegExp(r'/(\d)(?=(\d{3})+$)'), (match...
Camorra asked 11/8, 2015 at 0:25

4

Solved

Not to be confused with how to split a string parsing wise, e.g.: Split a string in C++? I am a bit confused as to how to split a string onto multiple lines in c++. This sounds like a simple ques...
Franciscofranciska asked 4/10, 2010 at 21:13

7

Solved

Like: float(1.2345678901235E+19) => string(20) "12345678901234567890" Can it be done? (it's for json_decode...)
Knotgrass asked 29/7, 2011 at 17:16

17

Solved

I have a string: "31-02-2010" and want to check whether or not it is a valid date. What is the best way to do it? I need a method which which returns true if the string is a valid date and false i...
Industrious asked 2/6, 2010 at 7:46

4

Solved

Just like the the iPhone's app names that run to long, the name gets shortened. I really like this method of shorting a name or a string rather then appending a "..." clause to it. Sorry if I am be...
Hartzog asked 23/1, 2010 at 3:56

4

Solved

I am editing an e-book document with a lot of unnecessary markup. I have a number of sections in the text with code similar to this: <i>Some text here</i> I am trying to run a regex ...
Unpretentious asked 19/6, 2014 at 14:3

5

I have an application, and it is fed some HTML. It then needs to put that HTML into a string. This HTML contains single and double quotes. Is it possible, in javascript, to declare a string with in...
Magnification asked 8/7, 2011 at 18:17

5

Solved

I have a large array of strings such as this one: "INTEGRATED ENGINEERING 5 Year (BSC with a Year in Industry)" I want to capitalise the first letter of the words and make the rest of th...
Daysidayspring asked 13/11, 2015 at 15:22

9

Solved

I have a string that has new lines in. I am wanting to convert these to HTML <br>s, but I'm having a hard time detecting them. Imagine a JavaScript string set like this: var foo = "Bob is c...
Lollard asked 14/4, 2012 at 14:40

2

I really hate to write this question because I'm kind-of "research guy" and, well, I always find what I'm searching for... But this one bugs me a lot and I can't find the answer anywhere... So, her...
Impaction asked 30/11, 2013 at 15:19

6

Can anyone suggest me how to check if a String contains full width characters in Java? Characters having full width are special characters. Full width characters in String: abc@gmail.com Half w...
Filicide asked 8/4, 2015 at 7:52

8

Solved

I need to highlight a keyword in a paragraph, as google does in its search results. Let's assume that I have a MySQL db with blog posts. When a user searches for a certain keyword I wish to return ...
Colston asked 2/11, 2010 at 19:27

7

Solved

This code is not valid: private void Foo(string optionalString = string.Empty) { // do foo. } But this code is: private void Foo(string optionalString = "") { // do foo. } Why? Because stri...
Revenant asked 31/8, 2010 at 5:41

10

So I have a csv file that contains full credit-card numbers.. We dont need the full number, and so I am writing a quick script to parse through the csv and replace the cc number with a masked repre...
Christianly asked 16/3, 2012 at 1:30

5

Solved

I have two string columns in my Pandas dataset name1 name2 John Doe John Doe AleX T Franz K and I need to check whether name1 equals name2. The naive way I use now is using a simple mask mask=d...
Anaclitic asked 11/3, 2016 at 12:57

14

Solved

I want to check if a string contains special characters like !@#$%^&*.,<>/\'";:? and return true if the string contains atleast one of those chars. I tried with the following regex,script: ...
Mistress asked 31/8, 2015 at 12:18

4

Solved

Python can multiply strings like so: Python 3.4.3 (default, Mar 26 2015, 22:03:40) [GCC 4.9.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> x = 'my ...
Hindustani asked 15/10, 2015 at 2:52

3

Solved

I have the following dataframe: R_fighter B_fighter win_by last_round Referee date Winner 0 Adrian Yanez Gustavo Lopez KO/TKO 3 Chris Tognoni March 20, 2021 Adrian Yanez 1 Trevin Giles Roman Dolid...
Alban asked 18/10, 2021 at 13:2

2

Solved

I am thinking of how the in operator implement, for instance >>> s1 = 'abcdef' >>> s2 = 'bcd' >>> s2 in s1 True In CPython, which algorithm is used to implement the st...
Aile asked 9/8, 2013 at 3:30

7

Solved

I'm new to Swift and I am using SwiftUI for my project where I download some weather data and I display it in the ContentView(). I would like to highlight some part of the Text if it contains some ...
Coolth asked 31/5, 2020 at 4:24

© 2022 - 2024 — McMap. All rights reserved.