Questions tagged [string]
A string is a finite sequence of symbols, commonly used for text, though sometimes for arbitrary data.
string
184,723
questions
1
vote
2
answers
34
views
How to find all occurrences of a substring in a string while ignore some characters in Python?
I'd like to find all occurrences of a substring while ignore some characters. How can I do it in Python?
Example:
long_string = 'this is a t`es"t. Does the test work?'
small_string = "test&...
0
votes
0
answers
7
views
How to set exception for URL with certain parameters in a string (REACT)
I am trying to conditionally render JSX element and looking for a way to exclude any URL that has a subpage in it. see example: eg. "/blog/some-parameter"
<div>
{/* Conditionally ...
0
votes
0
answers
8
views
Finding Longest Palindromic Substring, solution is too inefficient but I am not convinced dp is more efficient in this case
I have a solution which is O(n^2).
My idea loop through each character of the given string and find longest possible odd and even substring which results in a palindrome.
Why does my solution take so ...
1
vote
2
answers
86
views
Remove trailing whitespaces within [] with sscanf
I need to parse lines returned by utmpdump /var/log/wtmp. They are in this format:
[8] [13420] [ ] [ ] [pts/3 ] [ ] [0.0.0.0 ] [2024-07-22T11:18:29,836564+00:...
-7
votes
0
answers
57
views
Find smallest palindromic number divisible by 7 [closed]
Given an integer N, find the smallest palindromic number (in String format) of N digits that is divisible by 7. A palindromic number is one which remains the same when its digits are reversed.
...
-2
votes
0
answers
10
views
How do i correct a text string that appears different in the pivot table? [closed]
A text string "Calibration" is appearing as "r" in my pivot table. I have tried to correct this but the r is still there.
I have tried to enter the details of the row that has the ...
0
votes
1
answer
18
views
How can I use a parameter to alter which data my profile.Data is accessing?
local expType = tostring(type1)
local expTypeStat = expType:gsub("Exp", "")
local profileDataExpType = "profile.Data."..expType
Here I want to change ...
1
vote
2
answers
51
views
Pattern matching in a dataframe
I am having some trouble conducting pattern matching within a data frame. I am working with grepl function in R.
I have a data frame of 5 local districts in two years (2001 and 2002). I want to check ...
0
votes
0
answers
19
views
How to modify a "Name+2nd name+Surname without touch 2nd name? Phyton
I want to change 2 characters in a variable in phyton but when I fix one the other change again.
I have this variable.
name= " rIana Danyela RodrYguez "
I don't want to touch the name &...
0
votes
1
answer
24
views
VB.net Multiple ListBox Selected Items carried into to separate form
Not even sure if what I am trying to do is possible. My goal is for the user to select multiple items from a list box. which are file names and be able to plot the data that's in the files on a ...
2
votes
1
answer
87
views
Scan the string from white space until end using format specifier
I have an existing code that scans a string and stores values in multiple temporary variables.
Here is the sample code:
char str[] = "# # Time=80 interval";
char hash1, hash2;
char timeStr[...
-1
votes
0
answers
10
views
how to convert url string parameter to numbers [closed]
http://www.example.com/4qgkuNuQsYM%2bawDIW9hkkA%3d%3d
In the above line, after domain name it is url string. and it is actually numbers that are converted into these characters. Is there any ...
4
votes
3
answers
95
views
Create a string synopsis
Given a unknown string with an unknown size, e.g. a ScriptBlock expression or something like:
$Text = @'
LOREM IPSUM
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem ...
1
vote
1
answer
56
views
Comparing string uniforming special characters in python [duplicate]
Probabily I can use a better english but what I want is ignoring accent (and like) in words so:
renè, rené, rene' and rene should be the same so should
mañana and manana or
even-distribuited and even ...
-1
votes
0
answers
109
views
Is it possible to truncate or trim part of the name of a subdirectory? [closed]
I'm copying a 20-year-old Blogger site to new hosting and CMS. I'm using wget to copy 30K+ images, and am using the -nH option in wget to also copy the original directory structure. Mirroring the ...