Questions tagged as 'string'

3
answers

Clear C buffer with fflush () or __fpurge ()

Studying strings in C I came across the following phrase: "Cleaning the buffer, for example, is not always desirable, and for more professional and safe programming it is not recommended to use fflush for example." Why using the fflush()...
asked by 04.02.2016 / 15:24
2
answers

C # - How to check if a string has only spaces?

The propgram reads all rows from a file, and I have to check that in this line that it is reading it has only spaces, because if it has only spaces in it, it will be considered invalid by the program. How do I check if it has only spaces ("")?...
asked by 24.08.2017 / 21:41
4
answers

Get most used words from a string

I have a large string: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas porttitor non felis quis dignissim. Morbi varius arcu lorem, eget efficitur nibh interdum vitae. Aenean tristique hendrerit diam a consequat. Nunc eleifen...
asked by 20.12.2014 / 22:01
2
answers

Check string value

I wanted you to check if the value entered is vegetarian, and if it is, print on the user's screen is vegetarian as the code follows, however when I type vegetarians or anything else it alerts you that it is not. import java.util.Scanner; publ...
asked by 22.03.2015 / 21:04
3
answers

Remove first word from String

I have stringBuffer with a phrase inside. I need to remove the first word from the string. Making the second become first and the number of words to be x-1.     
asked by 28.01.2015 / 22:13
3
answers

How to check if Ajax's return is JSON or String?

My code looks like this: sendAjax(new FormData(this), function(retorno) { if(retorno.isArray) { $(".erro-login strong").text("ID: " + retorno.id + " usuário: " + retorno.usuario); $(".erro-login").show("slow");...
asked by 17.05.2016 / 20:44
2
answers

Protecting data in memory

I have read a lot of articles on cryptography etc ... The encryption reported by the posts was a success in my program, however some data stay in memory being vulnerable to Assembly readers in real time. An example of this is Cheat Engine , w...
asked by 09.04.2016 / 14:18
2
answers

How to separate numbers from three to three, backwards in JavaScript, without regular expression?

I already know how to separate the numbers of three in three, backwards, with regular expression in JavaScript . But I would like to know if there is a simpler solution in JavaScript, and without the use of regular expression. For example...
asked by 06.02.2017 / 12:05
2
answers

How to scan a string and check content inside it?

I need to make a check with a given text within a string . How do I go through this string and look up the text to do this check? Example: If(dentro da string contém "Olá") { Mostre o valor determinado para essa string; }     
asked by 03.11.2015 / 13:41
2
answers

Optimization of several ifs in something more practical

I have a string of alphabetic characters: char string[] = "aouihuiahsudasduihqmdoiqjnduiamsdoqnwuidamodkjwodkaposdj"; I want to go through it and for each character of it, say how many times it repeats itself in string . Example: #i...
asked by 04.07.2017 / 02:07