Questions tagged as 'string'

1
answer

3-letter abbreviation table for cities by state [closed]

In the State of SP, for example ADA would be Adamantina, ADO Adolfo, AGU Water, AGD Acutes, ..., ADC , Alvaro de Carvalho, ABR Americo Brasiliense, .. . SJC Sao Jose dos Campos, ... But "could be"...
asked by 25.06.2018 / 17:33
3
answers

Convert an array of numbers into a single string in php

How do I transform an array of numbers into a single string in php? In the code below the variable $ result is the array of numbers, and I tried to convert it to a single string with the implode () function. But it does not seem to work becau...
asked by 27.05.2018 / 22:47
2
answers

What's the difference in assigning an already started array to an uninitiated array?

char nome[10]; nome = "w" //Aqui ocorre um warning, por quê isso ? char nome_dois[10]; nome_dois[0] = "w" // Aqui e normal, como esperado. "w" is in a static memory? How much of% is in a dynamic or static memory? When I call...
asked by 25.05.2018 / 05:32
1
answer

The operator + is undefined for the argument type (s) CharSequence, int

I am trying to concatenate a text in% with% with% with%, but java warns that it is not possible to do this by saying:    The operator + is undefined for the argument type (s) CharSequence, int I have already tried to remove the casting...
asked by 09.07.2018 / 19:58
2
answers

Problem in compiling string in C

I'm trying to compile this code in C: #include<stdio.h> #include<string.h> #define tam 100 typedef struct TipoAluno{ char nome[50]="A"; char curso[50]="B"; char cota[50]="C"; int matricula; int coef; }TipoAluno...
asked by 02.06.2018 / 18:06
3
answers

How to concatenate strings without using function?

Good afternoon people, I have this doubt. How do I concatenate two strings without using function or library for this?     
asked by 16.03.2018 / 21:02
1
answer

Python string corrupted with character \

I have a program that creates another program on the user's computer. In a snippet, I define the directory to which the new program will be destined as diret = "C:\Users\" + d_user where d_user is the rest of the directory. However when it...
asked by 11.04.2018 / 02:49
2
answers

Function that returns next character in ASCII table in PHP

I would like to make a function in PHP that takes a character and returns the next character, according to the ASCII table. For example: get 'a' and return 'b'. I know how to do this in C, which would be char funcao(char C) { return C++;...
asked by 13.02.2018 / 00:39
1
answer

how to remove \ n from a string in python

I'm trying to exclude control strings from (\n, \t, \u) of strings in Python and I can not do it with either replace or re.sub() . How could I do it? I've tried, and they have not worked: p = re.sub('\n', '', p) p.repl...
asked by 06.04.2018 / 17:44
1
answer

String with the largest and smallest number of characters

I want to return the largest and smallest string . See: nl=str(input('Digite uma string')) String=[] string.append(nl) while caractere != 'pare': caractere = str(input("Digite uma letra ou número ")) string.append(caractere) A...
asked by 06.03.2018 / 00:59