Questions tagged as 'string'

2
answers

How do you compare a string when it only has one space?

I would like to compare my variables, to validate a form: if ($nome or $categoria or $rua or $numero or $bairro or $abre or $fecha or $email or $telefone == " ") { echo"Tente novamente</b>, faltou preencher corretamente um...
asked by 30.04.2018 / 13:38
3
answers

Comparing string contents in C to find palindrome

I need to check if a string A, for example, is equal to string B to determine if the entered word is a palindrome, string B is the inverse of A, I can not determine if the contents are the same. For example, I enter with the word "macaw", t...
asked by 26.03.2017 / 23:48
2
answers

Ignore if uppercase and lowercase in string

n1 = input('Qual é o seu bolo favorito?') if n1 = 'Bolo de Chocolate': print('teste123') If you write "Chocolate Cake" all in lowercase or all in uppercase, it will end up happening not to enter the if that I created, does anyone kn...
asked by 26.10.2018 / 23:22
2
answers

Copy string from given character

I'm developing a C program, which will work with 02 files .txt The first file is a report, which comes out directly from the system, and there are information such as item code, location and quantity in stock, this information is on th...
asked by 02.01.2017 / 23:35
2
answers

Check string? [closed]

In event keyup of a input I want to check the following cases: If string has letter and number "abc123" ; If string is uppercase and lowercase "aBc" ; If string has numeric alpha character...
asked by 28.12.2015 / 21:09
2
answers

Show only the last word of a string

The purpose of the program is to read a string , eg read - Silva printar That is, always start the last word of string . My logic was to read the string from back to front, and to find the first space to stop the loop. In t...
asked by 25.01.2018 / 19:17
3
answers

Manipulating TextBox

Simply fill in the fields Modelo , Placa , Km and this will be saved in the multiline fields below: ButwhenIclickthe"Save" button, the result is completely opposite to what you expected. I wanted each field to be one ahe...
asked by 25.01.2018 / 20:04
3
answers

Help on how to get the last word of a string and append to the beginning using java

I have a full name: Jais Pereira Guedes Godofredo The example below, I get the last word, but how to print with this result: Godofredo, Jais Pereira Guedes public class Aula1{ /** * @param args the command line arguments */...
asked by 02.01.2018 / 15:56
2
answers

Remove characters from a string between two specific characters in java

I have a String that contains the file path, and I need to remove the characters that come after the last "/" to the end of the string. Can anyone help me with this? ... Example: String comando = "C:/Users/Vinicius/Documents/N...
asked by 15.10.2017 / 17:37
2
answers

Unhandled exception (0-based index)

My idea is to make a small registration and I'm testing this for later adding that data to a DB. The problem occurs at line Console.Write("\nGenero do disco : {1}", genero); , at the time of displaying the string read via keyboard. Here...
asked by 09.07.2017 / 04:31