Questions tagged as 'string'

1
answer

How to change null field to return nothing?

In a query has many fields unfilled, I would like to change the null being printed so that nothing appears in the print.     
asked by 18.05.2016 / 21:41
3
answers

How to detect if a variable is null?

I'm trying to validate a simple form in Python 3 and I want to prevent it from registering the information if the nome field is empty, but when I make a if to check that the name variable is empty, it it returns me that it i...
asked by 31.07.2017 / 02:11
2
answers

What is "\ x" in strings in Python?

I replied a question here on the site where the following string existed in the Python language: "\xf7\x1a\xa6\xde\x8f\x17v\xa8\x03\x9d2\xb8\xa1V\xb2\xa9>\xddC\x9d\xc5\xdd\xceV\xd3\xb7\xa4\x05J\r\x08\xb0" I imagine that this \x...
asked by 10.08.2017 / 15:38
3
answers

How to format cpf correctly in python?

I have the following code: test = input ("CPF: ") When the CPF is entered: 12345678900 But when I return this input it returns: 123.456.789-00 How do I do this in Python?     
asked by 14.09.2017 / 18:05
2
answers

String pointer does not work as expected

I'm trying to print the string pointer below, and if I put " %s " + char* t[]; it gives error, I already put %c it prints the letter " i " I do not know why. I want to learn and not ctrl + c and ctrl Also appeare...
asked by 23.10.2016 / 02:05
4
answers

Count the number of times a character appears in a string

I need to count the number of times a character repeats in a string . For example: How many times does the / character appear in the string below?    '/ file / program-files / test / dev / dev1 / Central.pdf.gz' This string will...
asked by 21.10.2016 / 17:18
3
answers

Fill string with blank boxes [duplicate]

I need to format a string so that it contains only 30 characters. If you have less than 30, you should fill in the blanks, and if you have more, you should leave it with only 30. I know you should have a way to do + - like this: string...
asked by 08.03.2017 / 20:04
3
answers

Print a character in place of a number

#include<stdio.h> #include<string.h> int main() { char str[50]; int i, l = 0; printf(" We will count the number of letters\n"); printf("-------------------------------------\n"); printf("Tell me the word: \n");...
asked by 22.12.2016 / 00:16
2
answers

Copy Strings in C

I have the following two-dimensional array of strings. char matriz[linhas][tamanhoDaString] Through strcpy I copied a string there. char *aux = "abc"; strcpy(matriz, aux); My goal was to set linha 3 to aux . H...
asked by 23.03.2014 / 16:15
2
answers

Is it safe to use JavaScript's String.concat method in current browsers?

I was noticing that in JavaScript the String object has a method called concat . It serves to do the same thing as the + operator does. "Meu nome é " + nome Already with concat would look like this: "Meu nome é...
asked by 10.03.2016 / 16:19