UDF for Find the First letter from Input
Hi Masters,
I want find the first letter from input, Can any one help me on this..UDF or any solution.
Ex: E2HB means - Alpha Letter is the first
Ex: 1234 means - Number is the first
Thanks,
Siva
Hi Siva,
I just want to clarify this doubt, you want the first character of the string you pass to the UDF i.e if input="E2HB" output="E" and if input="1234" output="1". If my assumption is correct you can try the UDF "firstChar" I have shown below this gives exactly the output you want
public class firstLetter {
public static String firstChar(String s)
if(s==null)
return null;
if(s.equals(""))
return s;
String t="";
t+=s.charAt(0);
return t;
public static void main(String[] args) {
String s1="E2HB",s2="1234";
s1=firstChar(s1);
System.out.println(s1);
s2=firstChar(s2);
System.out.println(s2);
Regards
Anupam
Similar Messages
-
I am trying to create a form where one the customer has input their name and phone number it should grab the first letter of the customer's name and then the last 4 digits of the phone number.
I am not very good at coding, and have VERY VERY limited background in coding. I understand a little (the basics pretty much).
I am thinking i am not using the right expression to get what i want. Below is the statement I have write. This is just to find the first letter of the name, have an idea on how to get the phone number but i was trying the use the "left" and "right" functions but they wouldn't work. More specifically the left.
form1.#subform[0].CustCode::initialize - (JavaScript, client)
str = CustName;
var a = str.substr(0, 1);
any help would be greatly appreciated.
If more information is needed, please don't hesitate to ask.If you switch your language to FormCalc you can use the Left and Right functions, e.g.
Concat(Left(Name,1) , Right(Phone,4)) -
I have version 3.6.16 and when I login to my hotmail account, and type the first letter of the email address, a drop down box appears with my hotmail address and I can choose it from that box with a click.
How do I get version 4 to do this?
Thanks.The new but not-ready-for-prime-time autocomplete method searches for matches that contain the entered text, not just ones that begin with the string. Your options are:
1) type in longer strings that narrow the search
2) use an add-on to search just the beginnings:
https://support.mozilla.org/en-US/questions/1037469
3) install an older version of TB:
http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/ -
Auto-Capitalization: How can I set Pages v5.01 to auto-capitalize the first letter of the first word in a sentence and to automatically change lower case "i" to "I" appropriately. I'm unable to find a menu that offers me these.
Gavin Lawrie wrote:
Once it had been established that the iWork rewrite had resulted in some features being lost and others broken, and once Apple had acknowledged the concerns* and suggested they are working on fixes**, I'm not sure what else there is to achieve.
You are writing that in the perspective of having read about it here already. Repeated often enough that you encountered it somewhere in the posts.
Users are flooding in here and don't know any of this. Of course we have to repeat everything endlessly.
Because I like to give precise, understandable and workable answers to repeated questions, and Apple doesn't allow sticky posts here, I created a separate forum which users can consult to look up real answers, and contribute for themselves if they have something valuable to add:
http://www.freeforum101.com/iworktipsntrick/
There is a section purely devoted to Pages 5. Add whatever answers you feel will lighten the problems of Apple's 'upgrades'.
Peter
* Where have they acknowledged anything?
** They have barely anything listed, compared to the massive list of deleted features, and nothing but an extraordinarily long time frame considering they created the problems here and now. Apple has not said they will do anything at all about fixing the real issues, the biggest of which is that the new iWork apps break virtually all the work of existing users. -
The program would enter info for me. I only had to type the first letter or number of the info needed. For example, my first name is OSCAR. So, to enter this info in the box marked "First name", I only had to type in the box the letter "O". The program would then type OSCAR. I would then click on the name "OSCAR" and the name OSCAR would be entered in the box asking for my first name. Same with "city", "zip code", "last name", "email address", etc. Is this a Firefox feature??
That feature would be provided by an add-on for Firefox. The most popular add-on of that type was the Google Toolbar for Firefox, which has been discontinued by Google for Firefox 5 and future versions. <br />
http://googletoolbarhelp.blogspot.com/2011/07/update-on-google-toolbar-for-firefox.html
There are a number of different '''"auto fill"''' add-ons that are available from other developers. Look at this search for one that meets your needs. <br />
https://addons.mozilla.org/en-US/firefox/search/?q=auto+fill&cat=all&x=0&y=0 -
How to solve?pages and keynote cut the first letter when opening an imported file from doc or ppt or even when pasting text to a new pages document.
I write in Hebrew, which is a right to left language.
Never got a warning that this apps do not work In my language. They are available in my country's AppStore and that was the reason I bought the iPad.
Thank you,
DiegoAll iWork apps, both for iOS and OS X, have always had bugs that make them unsuitable for RTL scripts for most purposes. The only solution is to use something else.
Also you can tell Apple you views here:
http://www.apple.com/feedback/pages_ipad.html -
I am not computer savvy. I don't want to clear all my history, just one specific site. I deleted it, its cookies, passwords and everything and when I type the first letter of the website in, it shows up as one of the options for websites. I need to delete it, but how?
Maybe these will help?
*http://kb.mozillazine.org/Deleting_autocomplete_entries
*[[Remove websites from the Awesome Bar suggestions]]
It's possible the website is in your bookmarks and when you type in some letters in the Location Bar that match that bookmark, it is coming up from there. See [[Search your bookmarks, history and tabs with the Awesome Bar]] for details on changing your Location Bar settings in your [[Options Window - Privacy panel|privacy settings]]. -
When I open compose and type the first letter of the recipients address in the To: bar a dropdown appears with a listing of the email addresses I have sent messages to in the past as well as addresses of my contacts list.
How do I delete an address from this dropdown?Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
*Don't make any changes on the Safe mode start window.
*https://support.mozilla.com/kb/Safe+Mode -
How do you change the first letter of a new line from uppercase to lowercase?
In filling in case sensitive id's and passwords, the iPad automatically capitalizes the first letter---how do you change to lower case?
You can shut off Auto Capitalization in the settings to prevent that from happening. Go to Settings>General>Keyboard>Auto Capitalization>Off.
You can change to lower case manually by tapping the "black X icon in the arrow" in the upper right corner of the keyboard to delete the capital letter and then type in the lower case letter. -
If someone is checking the yahoo mail from my computer, their ID appears if the first letter of my ID is the same with theirs. How can I delete their history logging on my computer?
thank you, Matt :)
you really helped me! -
I got mountian lion for my macbook pro when it came out and since then, a mac notification pops up every once in a while and it just flashes on the screen real quick and then goes away. I can't even read the first letter so I don't know what it's saying or how I should fix this/disable it. Any ideas??
I haven't figured out what caused it, but I seem to have fixed it by doing a simple back up and restore to factory settings than set up with the back up. Everything is working fine now. I would recommend trying that if you haven't already.
-
Hi
Can Configuration Manager provide a way to find the data transfer from client to Configuration Manager for health monitoring and hardware Inventory. How can I know what amount of data is consumed during that processPlace archive_reports.sms in %systemroot%\ccm\inventory\temp\ for both 64-bit and 32-bit computers.
There are two situations where you can use this depending on the type of client:
1. To keep inventory reports on a client (that is not an MP), create the following file:
%systemroot%\ccm\inventory\temp\archive_reports.sms
2. To keep inventory reports on a MP (that is also a client), create the following file:
<x>:\sms_ccm\inventory\temp\archive_reports.sms
The XML file will be saved in the inventory\temp folder.
More information on the above here: http://blogs.technet.com/b/configurationmgr/archive/2012/09/17/controlling-configuration-manager-2012-using-hidden-files.aspx -
When I go to a search box, i type in the first letter and the whole word comes up.
I type in the first letter of the username and the whole word comes up.
I just type anything and the next time i log, it remembers the whole word.
Please take this out of my system. I do not want it to work this way. I want all memory to be gone.I'm starting to come to this conclusion myself, actually... though, how mom managed to do this on accident without mucking about in terminals or anything more than just a cursory knowledge of the OS X system configurations (behind the scenes), I don't know : |
... on the other hand, her and I tend to be the exceptions to a lot of rules : |
I downloaded and installed TinkerTool, even though it supposedly doesn't work past 10.5.8, in the hoopes that, what it displayed (regardless of what it could change) would be correct as far as my "System" and "System (Headlines)" font settings were (see attached screenshot of the font section of TinkerTool for my system--not mom's).
I've instructed her to install and run the utility (but not to change anything) and then send me a screenshot of the "Fonts" section so I can compare it to my own. If there's something different on her system, since TinkerTool should work on hers, we may be able to fix it that way... though it would, frustratingly enough, remain a mystery to all concerned as to how she managed to stumble upon this in the first place : |
Anyway, I'm still hard at work on it... hopefully others are too and will share what they discover (if anything). -
How do i stop firefox from auto suggesting my email adress after i type the first letter
after the first letter typed it comes up with lots of suggestions even ones i've typed by mistake and i would like to clear these
You can very quickly eliminate the mistyped entries with the down cursor key and use of "Del" key on the selected item ("Shift+Del" on a Mac). So you would just have the ones you want. You do not need to type the first letter you can double-click within the entry box to see all items whether to use or to delete.
That does not answer what you asked. If you only want to suppress that, I don't think that would be possible with Firefox alone, but I also would not think that you would want to suppress all autoform entry because of that. -
Getting the autocomplete setting to work by typing the first letter of a word
Before I installed Firefox 5.0, I had made it so that whenever I visited a website that remembered an account/password of mine, this happened:
1.- It asked for my master password.
2.- After entering it, I would click on the form field and then type in the FIRST LETTER of the account.
3.- When entering that exact first letter, Firefox would suggest in a drop-down menu the account or accounts that started with that letter on that particular site, e.g.: say I have a Twitter account that is "koko999". If I went to twitter.com and entered the letter "k" in the form field (after entering the master password), Firefox would suggest the account "koko999" in the drop-down menu.
4.- After selecting the account that I desired from the drop-down menu, Firefox would automatically autocomplete the password.
5.- Then, if I closed Firefox, all my active accounts would close/sign out. So, if afterwards I opened Firefox, I would have to repeat from Step 1 if I wanted to use an account, e.g.: if I closed FF while having my Twitter account logged in, and then opened FF again, I would have to start from Step 1.
Now, I had this setting for a bunch of different websites. After installing Firefox 5.0, this configuration vanished or something. Now, when entering the master password, Firefox autocompletes EVERYTHING. Say, using the example from before, that I go to twitter.com. Firefox asks for the master password, I enter it and then the ID/password for the twitter account automatically fills in without me entering any letter in the form field. And I do not want Firefox to do that!
So, I'm asking for help. I know that what I what to do is not impossible, I just can't find the way to do it! I kinda need the exact steps. Thanks a lot!See:
* http://kb.mozillazine.org/Password_only_filled_after_entering_user_name
* http://kb.mozillazine.org/signon.autofillForms (false)
If you are in Private Browsing then Firefox wont fill the names and passwords automatically.
You can set the pref <b>browser.sessionstore.privacy_level</b> to 2 (never) or 1 (non-HTTPS, default in Firefox 3 versions) on the <b>about:config</b> page to disable saving cookies via session restore.
* http://kb.mozillazine.org/browser.sessionstore.privacy_level
You can also use [[Clear Recent History]] to clear the "Active Logins" when you close Firefox.
To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
If you see a warning then you can confirm that you want to access that page.<br />
You can use the Filter bar at to top of the about:config page to locate a pref more easily.
Maybe you are looking for
-
SAP IHC payment order cannot be posted
Hello experts, I am trying to configure SAP In-House cash functionality for my client, I am able to generate an outbound IDOC from the subsidiary and this outbound Idoc is also received in the IHC center successfully which leads to automatic creation
-
Tomcat servlet class not refreshing
I just started to work with Tomcat. My problem is that once I have compiled and put a servlet in myApps\WEB-INF\Classes directory even after I recompile it the browser displays old version. Only stopping and starting Tomcat shows the new version My b
-
Retina displays and image size
I am attempting to prepare images for a website launch. The site will incude a photography portfolio. My original assumption was to knock all the images down to 72 pixels, which is autmatically done in iPhoto. Being new to Apperature I do not see how
-
Urgent Timezone change: Venezuela - Patch needed or info how to change it.
Greetings, The Venezuelan government decided to change the Timezone of Venezuela (America/Caracas) from GMT -4 to GMT -4:30 by September 24th 2007. We need to change the timezone of a Solaris 10 server, of course, we thought about just changing time,
-
I have set my download on ask before downloading; however, I guess the program gets a little put off because it keeps asking and I keep saying "NO". Unfortunately, it takes it upon itself to download anyway. I love Firefox; however, I have been infor