Questions tagged [chars]

a datatype that can hold a character of the implementation’s character set.

208 questions
0
votes
1 answer

C++ 'std::out_of_range' error when turning string into character array

So, basically I'm creating a program that at certain points needs to display text one character at a time with intervals between each character. I created a function that I can pass a string into that is supposed to display the string one character…
0
votes
1 answer

Mssql query in hebrew fetchs nothing

I'm trying to fetch data from my DB. It works great when there are no hebrew chars involved, but it doesn't work with hebrew chars. Here's a query for example: while (list($ddd, $ccc) = each($dbb)){ $dsn = "DRIVER={SQL Server};…
Nir Tzezana
  • 2,275
  • 3
  • 33
  • 56
0
votes
3 answers

How to convert Strings to 2d char Array

I have a text file like this A B C D E F AABG EF 123 AD AD POLFE APF PLF ADS I'm trying to put each characters including blank spaces into a 2D array; I tried this data = new ASCIIDataFile(); int rowLen =0; String s =…
Shadid
  • 4,133
  • 9
  • 30
  • 53
0
votes
1 answer

Danger of not properly encoding html characters

Are there any dangers of not properly encoding html chars such as £ and & ? I know if you want to write : It was nice & cost £1 your html would be : It was nice & cost £1 But is there any danger if your html was : It was nice & cost £1
sam
  • 9,486
  • 36
  • 109
  • 160
0
votes
4 answers

Counting chars in a file | python 3x

I'm wondering, how can I count for example all "s" characters and print their number in a text file that I'm importing? Tried few times to do it by my own but I'm still doing something wrong. If someone could give me some tips I would really…
Denis Wasilew
  • 503
  • 3
  • 9
  • 29
0
votes
4 answers

How to form a string out of multiple chars in a for loop

The first part of my code is used to receive a single string input from the user and replace certain characters in that word using string class member functions. This part was easy for me to figure out, but I can't seem to figure out how to form a…
user3366885
  • 17
  • 1
  • 3
0
votes
2 answers

How to add a value to a string?

I am using C and the SDL library and am trying to express something like the following code: Surface = SDL_LoadBMP("Resources/Images/ButtonPlay.bmp"); as something like this: ButtonName = "ButtonPlay"; Surface =…
Inventor
  • 25
  • 6
0
votes
2 answers

sizeof with arrays in c

My assignment is to print the binary value of a decimal number, and I want to control the size of the array as I understood I should do so my program would work in all the compilers. I don't understand briefly the operator sizeof, but I would…
Assaf
  • 1,112
  • 4
  • 14
  • 35
0
votes
1 answer

substrings comparison in c language

My assignment is the following: In string matching we are looking for an instance of one string (the pattern) in another (the text). We are looking for the instance, with the lowest number of faults (mismatches). for exmaple, if the pattern is…
Assaf
  • 1,112
  • 4
  • 14
  • 35
0
votes
1 answer

how to write the mail body in aligned format in javamail

I will collect all the data from the database and put them inside a collection. I want to put all the data in that collection into my javamail body in the properly aligned format illustrated below. How should I put the list data inside the body…
user2838630
  • 91
  • 1
  • 5
  • 15
0
votes
4 answers

How to extract only numbered rows from a column

For e.g: I have a column named "Card No", its a varchar but majority of the rows contain numbers and few contains alphanumeric numbers. I want to ignore all the records that are not numbers. Below are a few examples for the same: Select CardNo from…
0
votes
1 answer

cut a string from right side to maximal 25 chars even when string is less than 25 chars, remove newlines of all kinds

In C# windows forms application I have strings of different length and format from which I would like to display a preview of the first 25 characters without containing any line breaks of any kind in the preview. The preview string should be…
feedwall
  • 1,473
  • 7
  • 28
  • 48
0
votes
3 answers

XSLT document() function with escaped chars in file name

Am parsing XML with file names with escaped characters. This is the file name on the server: Account-V%29%27%22%3B%3A%3E.layout When I apply the document function, it is automatically transforming the escaped characters. `
0
votes
3 answers

Separate chars of a file in matlab

I have strings of 32 chars in a file (multiple lines). What I want to do is to make a new file and put them there by making columns of 4 chars each. For example I…
0
votes
9 answers

Swap Two Chars in Two Arrays

So I have 2 char arrays and two random numbers, one number for each array. I want to get the char in the position of the random number in the first array, and swap that around with the char in the position of the second random number in the second…
sparklyllama
  • 1,276
  • 4
  • 20
  • 28