Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7969785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:17:29+00:00 2026-06-04T07:17:29+00:00

Context I want to generate all characters that can be generated by: opening note

  • 0

Context

I want to generate all characters that can be generated by:

  • opening note pad
  • pressing a single key on the keyboard
  • holding shift + pressing a single key on the keyboard

What I currently have:

(concat (range (int \a) (int \z))
  (range (int \A) (int \Z))
  (range (int \0) (int \9)))

then manually appending more characters like ~!@#$%^&*()_+{}|:”<>?,./;'[]\

Question

Is there a more elegant way of doing this?

Edits

Yes, I’m referring to US Qwerty keyboard.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:17:30+00:00Added an answer on June 4, 2026 at 7:17 am

    If you look at a US ASCII chart, it seems that all the characters you want are within (range 33 127). So the simplest way to get a sequence of all those characters is to convert that range to characters.

    (map char (range 33 127))
    

    But if you are trying to validate that a string contains only those characters, have a function like:

    (defn valid-char? [c]
      (let [i (int c)] 
        (and (> i 32) (< i 127))))
    

    Then you can use it with every? to validate a string:

    user=> (every? valid-char? "hello world")
    true
    user=> (every? valid-char? "héllo world")
    false
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My question is exactly that but in context I want to examine the selection
I want to move some code that takes a couple seconds to generate a
Hi all wondering if someone can help; i've written this code which will generate
Hope the title was OK. My problem is that I want to generate an
I have items that I want to go into a context menu. The problem
To provide some runtime generated API documentation I want to iterate over all Spring
I want to generate html content based on a result returned by http url.
I want to generate bytes sequence containing string length and string content. For example,
I'm building a website with user generated content. On the home page I want
Context: I want to use log4j to write audit-related logs to a specific log

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.