Questions tagged as 'string'

2
answers

How to separate characters from a string in R?

I have values a string containing a date "01/01/2000" I want to separate the day, month and year. #Data #01/01/2000 #Dia Mês Ano #01 01 2000 How do I do this in R?     
asked by 15.09.2015 / 13:35
2
answers

How to convert ASCII to binary?

I am trying to implement the conversion of a text to binary, I found one through the internet: static string ASCII_binary(string texto) { string converted = string.Empty; byte[] byteArray = Encoding.ASCII.GetByt...
asked by 30.11.2015 / 13:25
3
answers

How to store any string in C?

How do I store a string ) without first knowing the size of this string , for example: #include<stdio.h> int main (){ char nome[]; /* a array não tem tamanho determinado porque o input ainda não foi dado */ printf...
asked by 14.01.2017 / 14:30
2
answers

How do I make "Replace" replace all occurrences of a word regardless of case?

The Replace function replaces all occurrences of a word or expression, but is case sensitive: string str = "Hello WorLLd";//Substitui só os 'l' e não o 'L' str = str.Replace("l", "EL"); Console.WriteLine("My string: " + str); Output:...
asked by 11.09.2014 / 23:16
2
answers

Filter items that do not contain words in my list

I have a personal: List<Grupos> lista = new List<Grupos>(); And I have this code var txtFiltro = "noivas,unhas"; var palavrasFiltro = txtFiltro.ToLower().Split(','); matches = lista.Where(x => !palavrasFiltro.Contains(...
asked by 12.05.2016 / 16:50
3
answers

Convert object to String?

What is the best way to convert an object to a variable of type int ? Or is there no such conversion? Example: if (teste == JOptionPane.OK_OPTION) { int linha = tblPessoa.getSelectedRow(); // Aqui o ob...
asked by 22.10.2015 / 14:50
2
answers

How to retrieve specific parts / values from a string?

I have ArrayList where I am adding a custom list that is displayed in a ListView . What I need is to pass the value of the selected item to another screen. See below the method that will call the other screen: public void onIte...
asked by 18.05.2015 / 22:18
1
answer

More elegant ways to reverse integers, arrays, and strings in Python

Save! I've been looking for elegant ways to reverse strings, arrays, and integers in Python. What do you think of my codes below and what do they suggest to improve them? They work ... Thank you! frase = 'eu gosto de python'[::-1] num...
asked by 28.10.2015 / 00:33
1
answer

Loop with array + string

I'm trying to do something like: a = {move1="oi", move2="oi2"} for x=1, #a do print(a.move..x) end I can not explain very well, but what I'm trying to do is this: print(a.move..x) getting print(a.move1) and next print(a.move2...
asked by 02.11.2014 / 02:20
1
answer

Matrix of strings

How do I declare and start an array of strings ? I tried in many ways and I still did not succeed, I thought it would work fine but it did not work. #include <stdio.h> #include <stdlib.h> int main(void){ char matriz[2...
asked by 05.09.2017 / 14:38