Questions tagged [letter]

a character representing one or more of the sounds used in speech; any of the symbols of an alphabet.

448 questions
4
votes
9 answers

Count letters in a word in python debug

I am trying to count the number of times 'e' appears in a word. def has_no_e(word): #counts 'e's in a word letters = len(word) count = 0 while letters >= 0: if word[letters-1] == 'e': count = count + 1 …
Johnny
  • 233
  • 3
  • 4
  • 6
4
votes
1 answer

How do I check if a string contains at least one number, letter, and character that is neither a number or letter?

The language is javascript. Strings that would pass: JavaScript1* Pu54 325 ()9c Strings that would not pass: 654fff %^(dFE I tried the following: var matches = password.match(/\d+/g); if(matches != null) { //password contains a number …
Michael Drum
  • 1,151
  • 5
  • 14
  • 26
4
votes
4 answers

Javascript Function that returns true if a letter?

So I'm looking to write a function for my class that is titled isAlpha that accepts a character (preferably a string with length of 1) and returns true if it's a letter and false if it's not. The thing is I'm completely stuck on where to go. This…
johntc121
  • 199
  • 1
  • 2
  • 11
3
votes
5 answers

How can I check a string for two letters or more?

I am pulling data from a table that changes often using Python - and the method I am using is not ideal. What I would like to have is a method to pull all strings that contain only one letter and leave out anything that is 2 or more. An example of…
johne518
  • 77
  • 5
3
votes
1 answer

Alphabetical Scrollbar in jetpack compose

Does anyone know how to create an alphabetical fast scroller, displaying all the letters in Jetpack Compose? Similar to this one: Recyclerview Alphabetical Scrollbar I have made a list which is scrollable, but I have no clue in how to make the…
3
votes
4 answers

How to move all capital letters to the beginning of the string?

I've been practicing simple solutions using what I've been learning / known. The question I've faced is, how to move the capital letters in the string to the front? I've solved it, but it's not to my expectation as my original idea was to → find the…
Rind
  • 175
  • 1
  • 3
  • 14
3
votes
2 answers

Shifting Strings using R functions

How to do shift a string in R. I have a string "leaf", when i do a left shift the result should be "flea". I have tried the shift() function. But am not able to understand how to do it on a each letter of a string. Can some one help me
Rebe
  • 39
  • 1
  • 6
3
votes
4 answers

isLetter with accented characters in C

I'd like to create (or find) a C function to check if a char c is a letter... I can do this for a-z and A-Z easily of course. However i get an error if testing c == á,ã,ô,ç,ë, etc Probably those special characters are stored in more then a…
jmacedo
  • 773
  • 1
  • 13
  • 24
3
votes
2 answers

CSS first-letter formatting creates gap between first and second line

When I use the css ::first-letter to increase the font in the following way: p:first-letter { font-size: 400%; } It creates a gap between the first and the second line of the paragraph. Can you please suggest a solution to avoid this gap.
Sujoy
  • 1,051
  • 13
  • 26
3
votes
1 answer

How to compare the first letters of a strings in R

I need compare a vector with strings which in any case they have the same two first letters. How I do it? I know the function compare in the library compare but I don't get it to work. Thanks in advance.
pescobar
  • 177
  • 1
  • 1
  • 10
3
votes
1 answer

Unwanted filled letters in webpage

I am using this great font from Fontsquirrel, Munro. (http://www.fontsquirrel.com/fonts/munro) I wanted to use this font in a webpage of mine. I've put the .ttf file in a map named 'fonts' and referred to it in CSS. nav a{ background:#9cf2e6; …
3
votes
1 answer

LaTeX formal letter: signature align left

For the life of me, I can't seem to figure out how to fix this signature. Right now, it is right-hand justified, and I want to make it left-hand justified. I am still pretty green when it comes to LaTeX and formatting documents in it. It is probably…
MechanicalMan
  • 163
  • 1
  • 10
3
votes
1 answer

Latex letter: Address right aligned

I am using Latex letter class, and would like the address to be right justified. The default is for it to be in a right aligned block, justified to the left. I am happy to change the letter.cls file, but haven't been able to figure out the right…
user304235
3
votes
1 answer

How to match a Unicode letter with a JSON Schema pattern (regular expression)

I need a good/easy way of matching any valid Unicode letter within a JSON Schema pattern using a regular expression as [a-zA-Z] is not good enough in order to support letters from different countries, e.g. China and Greece. I know this is possible…
FNL
  • 133
  • 1
  • 8
3
votes
4 answers

Letter avatar like Gmail Android best practice

What is the best way of generating (in code) a letter avatar like in Gmail? Here you have an example https://drive.google.com/folderview?id=0B0Fhz5fDg1njSmpUakhhZllEWHM&usp=sharing It should look like that:
Andrii Kovalchuk
  • 4,351
  • 2
  • 36
  • 31
1 2
3
29 30