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 6965749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:06:06+00:00 2026-05-27T16:06:06+00:00

Do you have an idea how to simplify this simple translation-mechanism? Is a Hash-Table

  • 0

Do you have an idea how to simplify this simple “translation-mechanism”?

Is a Hash-Table usefull?

    char translateChar(char strIn)
    {
        char strOut = '?';

        if (strIn == 'A') strOut = '1';
        else if (strIn == 'B') strOut = '2';
        else if (strIn == 'C') strOut = '3';
        else if (strIn == 'D') strOut = '4';
        else if (strIn == 'E') strOut = '5';
        else if (strIn == 'F') strOut = '6';
        else if (strIn == 'G') strOut = '7';
        else if (strIn == 'H') strOut = '8';
        else if (strIn == 'I') strOut = '9';
        else if (strIn == 'J') strOut = '@';
        else if (strIn == 'K') strOut = 'A';
        else if (strIn == 'L') strOut = 'B';
        else if (strIn == 'M') strOut = 'C';
        else if (strIn == 'N') strOut = 'D';
        else if (strIn == 'O') strOut = 'E';
        else if (strIn == 'P') strOut = 'F';
        else if (strIn == 'Q') strOut = 'G';
        else if (strIn == 'R') strOut = 'H';
        else if (strIn == 'S') strOut = 'I';
        else if (strIn == 'T') strOut = 'J';
        else if (strIn == 'U') strOut = 'K';
        else if (strIn == 'V') strOut = 'L';
        else if (strIn == 'W') strOut = 'M';
        else if (strIn == 'X') strOut = 'N';
        else if (strIn == 'Y') strOut = 'O';
        else if (strIn == 'Z') strOut = 'P';
        else if (strIn == '2') strOut = 'X';
        else if (strIn == '1') strOut = 'Y';
        else if (strIn == '_') strOut = '_';

        return strOut;
    }
  • 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-05-27T16:06:07+00:00Added an answer on May 27, 2026 at 4:06 pm

    I think this will help to you…

    char[] strIN = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '2', '1', '_' };
            char[] strOut = { '2', '3', '4', '5', '6', '7', '8', '9', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'X', 'Y', '_' };
    
    
            char init = 'C';
    
            int index = Array.IndexOf(strIN, init);
            char output = strOut[index];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have no idea why this is happening. The error I get is the
I'm gonna try and simplify this as much as possible. Lets say i have
Need help have no idea the thought process in doing this kind of simplification.
Anyone have idea about how to bind Boolean in sqlite with objective - c.
I have idea to write errors from my application to the Windows Event Viewer
Anyone have idea how to pass value from iPhone application to the REST-Webservice using
Any body have idea how to put controls dynamically in asp.net 3.5 ? if
I missed my workspace in which I was working. Any one have idea about
I have an idea for a functional programming language design that makes heavy use
I have no idea how to pass a value from jtable1 to jtable2 .

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.