Questions tagged as 'string'

1
answer

Convert string char * to std :: string

I have the following code: void splitstr(std::string &modulo, std::string &nmodulo, int &fk) { string frase = modulo; string aux = ""; stringstream strs; for (int i = 0; i < frase.length(); i++) { swi...
asked by 29.09.2015 / 16:55
1
answer

how to force a buffer to behave like a string in C?

I'm getting a buffer from the internet, I believe that to traverse this buffer and find the last character, you need to find the character '\ 0'. But there is no '\ 0' in a buffer. Can I force this buffer to behave like a string?     
asked by 24.06.2015 / 22:34
1
answer

How to select a String in column format? SQL SERVER

I have a STATUS field in a table with the following data: VENDA,COMPRA,DEV.VENDA I need to make a query in this field that the result is a column, where each row will be one of the strings between the ',' (VALUES). For example: VENDA...
asked by 22.05.2015 / 15:14
1
answer

how to write a name using pointers

I need a program that uses heap memory to store any name. we have the number of characters in the name and then the name, for example: 32 Josefina Penacho Reis dos Santos The output should be the name, in this case: Josefina Penacho...
asked by 05.06.2015 / 00:15
2
answers

Get only words from A-z and numbers 0-9

How can I remove anything other than the letter and number of a string , that is, remove ( !@#$%^&*():"><?} etc.) and keep only az letters and numbers 0-9     
asked by 31.12.2014 / 14:43
1
answer

String error in a function in Python 3

When I try to run the def of an error in the part of texto[x][y-1] , giving the following: erro:TypeError: 'str' object does not support item assignment Could anyone help me please? def moveJogador(mapa, mov): if mov == "c":...
asked by 06.05.2015 / 17:50
1
answer

Dismantle full numeric expression in C

Hello; I have a code that must be done in C language, which is to receive a numeric expression, including the result of the same, for example: "20 + 30 = 50", which will be stored in a string. After receiving the expression, I want to dismember...
asked by 17.11.2014 / 15:10
1
answer

Why does email get malformed when putting HTML in the body?

I have a jQuery editor that sends to my input a string in HTML format as follows. <p class="MsoNormal" style="text-align: justify; text-autospace: none;"><span style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: #28252...
asked by 11.08.2014 / 19:58
1
answer

PHP connection string Offline

I'm trying to connect offline to a MySQL database, but I'm not getting it. The code is on my machine, I've already tried IIS and XAMPP but every time I try to connect, it displays an error. Here's the connection string I'm using: $host = ""...
asked by 29.09.2014 / 20:37
1
answer

Pixel size of a String in Python

I would like to know how to make a Python code that checks the size of a string (in pixels). Assuming we have a string 'ALCON BOTTON FISH 50G' I would like to know what its pixel size is to center on a square I am plotting with reportlab (I a...
asked by 03.12.2018 / 20:47