Most voted "string" questions
A string is a sequence of zero or more characters. It is commonly used to represent text or a sequence of bytes. When marking a question with this tag, also mark with the programming language to be used and the operation being attempted with the string.
Learn more…1,904 questions
Sort by count of
-
0
votes3
answers158
viewsCapture only the second part of the string
I have the following code to perform the method Split on a path: Dim ItemsCopy As Integer = 0 Dim Caminho As String = ContarItems(I) Dim SplitCam As String() = Regex.Split(Caminho.ToString, "=") For…
-
0
votes0
answers184
viewsString.format() with error
I need to format the following string with the respective parameter, but this generating the following error: Caused by: java.util.Illegalformatconversionexception: %d can’t format java.lang.String…
-
0
votes1
answer4021
viewsRead a TXT file, sort, and save a new Java file
I’m doing a job for college, and I’m not being able to read the file and throw the dice into a Arraylist to sort the data, below follows as is my code so far public class Teste { /** * @param args…
-
0
votes1
answer423
viewsshow on the screen the position content?
import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.PrintStream; import java.util.Scanner; public class…
-
0
votes3
answers1128
viewsDraw characters in variable
I have a variable with the following content 00:00:01. I want to take out the two points to have the final result 000001. I use the split but the result I have is 00,00,01. var res =…
-
0
votes1
answer332
viewsProblem when doing String Code and Discovery
I would like to know why such methods do not behave in a way that: long2str(str2long(String s)) == String s public long[] str2long(String s){ final byte[] authBytes =…
-
0
votes1
answer256
viewsAutomatically list products from different stores
I have a question in comparing prices of products from different stores, I have no idea which component to use or how to do this. The idea is to do something similar to Buscapé and Zoom (relate the…
-
0
votes3
answers2375
viewsGrab part of the text that is between tags of a string
I have the following string: Meu nome é <nome> Nickolas Carlos<nome> I wanted to know how I can do in VB.NET to get only what is between the tags <nome> which in this case would…
-
0
votes1
answer44
viewsHow to Choose position to print a string in a text?
I’m developing an app where the user can choose in the middle of a text, the position where the output value of a string should be printed. Example: Normally when we print a string in the middle of…
-
0
votes1
answer64
viewsProblem in the supply function
I’m here with a problem in this role int supre (char S1[ ], char s2[ ]) , which calculates the size of the largest S1 suffix prefix of s2. For example if you have supplied ("cheat", "totality") you…
-
0
votes1
answer1388
views -
0
votes2
answers95
viewsHow to change filename with variable
This is the file with the variable I want. # pt/lang.php <?PHP $rp_lang = "pt"; ?> This is the file I want to insert but I want the variable to change the ending either to "pt" or "en" or any…
-
0
votes1
answer183
viewsMigration, remove accents from all names in a column in the database
I want to make a modification to a data series of a column in the database, remove the accents so I’m doing this function in php. The problem is that none of the functions I discovered work. The…
-
0
votes2
answers316
viewsWhat is the strategy to identify a right answer, without exact comparison of String?
I have a program in C# that is like a QUESTIONNAIRE, but instead of alternatives there are times when the user should type a response. The answer to the question is stored in a database and at that…
-
0
votes2
answers157
views -
0
votes4
answers2941
viewsSplit String using comma as parameter
I am trying to get the values of a Listview to send them to another screen by clicking on the item. So I have the following code: @Override public void onItemClick(AdapterView<?> parent, View…
-
0
votes0
answers115
viewsHow to read a pre-formatted string?
I have a file with String in a certain format, I would like to capture this string some information. Example: 0:13:13 - ID:( usuário ) / Name:( nome ) / IP ( 177.22.XX.X ) Memory Function Code Error…
-
0
votes0
answers75
viewsStart reading the beginning of the string list
How do I after adding a string to a list (can be on list A or B), my code goes back and starts reading the beginning of the string list, or the first string? I have a list with 20 strings. But it’s…
-
0
votes1
answer183
viewsDoubt about the use of `for` in voting system
I want to make a program where the user gives the number of candidates and their names, and then the vote is started until the user type order. Help? #include<stdio.h> #include<string.h>…
-
0
votes1
answer263
viewsGetting text within another text
I want to get a List(Of String) of text blocks, but there is a problem: { --isso é um bloco; echo "Aqui tem um } no meio";} and would like to get that way: --isso é um bloco; echo "Aqui tem um } no…
-
0
votes0
answers83
viewsJavascript - Filling Textbox with numbers, strings and dates in a boleto
I am trying to get a ticket filled automatically when selecting a row from a table. In this case, there are textbox (or text inputs) that must be filled with some values. My function is function…
-
0
votes1
answer658
viewsIs it possible to pass string from string class as pointer to function?
it is possible to pass string from string class as pointer to function? example: void separaStr(string *modulo, satring *nmodulo, *digito){}
-
0
votes2
answers198
viewsCreate a cross word C++
Who could help me with this? Let me give you an example of what I want. A A R R M M A N N D D O O But the same spaces have to be horizontal, as vertical, has to be square. Thank you…
-
0
votes0
answers17
viewsconversion of charset to Qt
I have the following string: Qstring str = "Integral noodles. Integral car < br/>" I don’t know the formatting/charset of this string, but I wanted to be able to take and transform all its…
-
0
votes1
answer156
viewsTake a string snippet
I want to take the word "[email protected]" that’s inside that metromessagebox I tried that, but it didn’t work out: String[] palavra = ex.Message.Split(new String[] { "(", ")" },…
-
0
votes1
answer62
viewsDeclared variable in viewDidLoad not found in Button - Swift 2
I have an array that generates a word when loading the viewController, and saves a random position in the variable declared in viewDidLoad or before inside the class. But inside the button you…
-
0
votes1
answer1009
viewsPick a specific part of a string using ANDROID split method
I made a code to display processes on android but when printing in a text view, it prints the PID, process name, memory cpu usage etc. The display is this way 958 2 0% S 22 577164K 42624K bg u0_a63…
-
0
votes1
answer346
views"strstr()" function is not locating what I expect
#include <stdio.h> #include <string.h> char tracks[][80] = { "I left my heart in Harvard Med School", "Newark, Newark - a wonderful town", "Dancing with a…
-
0
votes1
answer309
viewsSymmetric Swift encryption
I’m new to Swift, and I’d like to encrypt a string, using some symmetric encryption algorithm so that it’s possible with the same decryption key. I would like to know how this can be done in the…
-
0
votes3
answers1284
viewsCompare accented letters with accented letters
I decided to make a mini hangman game just to not rust in php, I’m having problems with words with accents, example: apple. Initially, I take it from an array and separate it into an array, leaving…
-
0
votes1
answer839
viewsError when reassembling a string. Size is out
I can’t fill out that list the way it is: foreach (var item in text) { string[] linha = item.Split('\n'); foreach (var i in linha) { string nova_string = i.Substring(0, i.LastIndexOf("\r"));…
-
0
votes1
answer460
viewsDouble check - Java
I’m not getting this check I’ve tried everything, but always gives me this mistake: java.lang.Numberformatexception: Invalid double: "" If anyone can help, thank you. package com.calculadora; import…
-
0
votes1
answer234
viewsWhy does this seemingly simple implementation of "strupr" not work?
Error implementation in GCC: char* strupr( char *str ) { while(*str) { *str++ = toupper(*str); } } Note that str is used twice in the assignment.…
-
0
votes0
answers360
viewsHow to capture website content and store in a database
Here the site that has the vacancies If you could just get in there and see how it works. I need to get the vacancy titles and the descriptions that contain in them as the: Company, Practice Area…
-
0
votes1
answer38
viewsHow to get these lines and blocks?
I’m creating a parser of a language I’m developing, I’m having trouble separating lines and blocks from code, follow the code I use to return lines: Friend Class Splitter Public Itens As New List(Of…
-
0
votes1
answer4109
viewsConverting char vector to string - C++
#include <iostream> #include <string> #include <vector> using namespace std; int main () { string vet[10], aux; std::vector<char> name; int count=0, sum=0; while…
-
0
votes2
answers1011
viewsHow to Accumulate strings in a single variable?
I’m trying to retrieve attachment names in a single variable and then print them all together. Note that I already send each file to the upload folder. So this is not the case. I really just want to…
-
0
votes2
answers229
viewsGet elapsed time from a string
I wanted to calculate the time now with what I get from a string like this: 2016-04-16T15:55:53Z But the time is three hours longer than our time zone, wanted some kind of exit: Já se decorreu 0…
-
0
votes2
answers16389
viewsRemove Python punctuation and symbols
I’m trying to remove the punctuation symbols and other symbols (characters like copyright, for example) from a string. I want to leave the accented characters, the hyphen, the apostrophe ('), the…
-
0
votes1
answer43
viewsData Reception and String Conversion
byte[] ret = new byte[29]; s.Receive(ret); Console.WriteLine("Retorno de Dados" + (System.Text.Encoding.ASCII.GetString(ret).Replace("211",""))); string tex =…
-
0
votes0
answers75
viewsUse Asynctask to capture web page data in Android app
Good morning, another newcomer in android development. Going straight to the point, I would like to know how to call an Asynctask, which captures a String in a web page, within another class,…
-
0
votes3
answers1957
viewsCannot implicitly Convert type 'Object' to 'int'. An Explicit Conversion exists (are you Missing a cast?)
I’m trying to develop a code in my game but I’m making this mistake. ... case "cpsuser": Console.Write("Digite o apelido do usuário: "); string Nickname = Console.ReadLine(); Console.Write("Digite a…
-
0
votes1
answer84
viewsI can’t write in Jtextarea
have the class: import javax.swing.JTextArea; public class Semantico { private String tipo; private String variavel; public void verificaSem(String stipo, String svariavel, JTextArea txtSemantico){…
-
0
votes1
answer224
viewsError Segmentation fault (core dumped) in read and break string code
I need to read each line of an input file, break it into tokens and save each token in a position of a struct. I am able to do this partially, but at a certain point in the file, Segmentation fault…
-
0
votes0
answers97
viewsEncryptar/Decryptar strings with Delphi
For knowledge purposes, I would like to create my own not very complex function to encrypt and decrypt program strings. I got this piece of code from the Internet s1[1] := Char((Byte(s1[1]) shl 4)…
-
0
votes1
answer37
viewsComplete Range Script on Swift 3.0
I was normally using this code in a Swift 2.0 project, then decided to upgrade the project to version 3.0 and adapt some functions that changed... Only the last "squeak" argument I can’t adapt. Code…
-
0
votes4
answers2799
viewsString reading with two or more names
How do I read a string with a compound name for example: "Vitor Martins"? I’m doing this program that stores a student’s name and note but it gives a bug when you type two names.…
-
0
votes1
answer87
viewsRead a specific phrase from a file and stop at it
I want to store in a string a part of an archive: Bruno Mossa Rezende 5 2 7 6 22 22 0.13 8 19 141 0.17 260 2 320 5.42 43 22 6 0.90 0 0 0 5 of that file I want to store in a string "Bruno Mossa…
-
0
votes1
answer86
viewsHow to send values in a hidden way to the SQL Database within Windows with POST
Good morning guys, I have a question in PHP. I have a page on my site that contains a form that sends the information from it to a validation page that connects and sends the information to the…
-
0
votes1
answer3668
viewsHow do I use fgets instead of gets?
before "talking" about my problem, first look at my code and ignore the accent errors in the console if you are going to run. #include <stdio.h> #include <stdlib.h> #include…