How to check one character NSString if it is A-Z?
How to check a one character long NSString, to see if it falls between the range A-Z? including upper and lower case.
thanks
I think for anything Unicode, the meaning is self-defining. By this I mean "Marks" are the set of characters they have grouped together and called "Marks". I found this site that explains the categories. A German eszett ß is actually a lowercase character, not a mark. It seems that the Marks are special combining characters in Arabic, Hebrew, Tamil, etc.
The key thing to keep in mind is that MacOS X is designed to work in all of those languages. So, if you are writing code to "check for lowercase", you have to realize that there are literally thousands of lowercase letters. You should probably have a graceful way to handle ß and similar characters. One thing I have done in the past is just substitute some special character for anything that isn't strictly "a-z". That way, regardless of the input, I know what the output will be. That worked for my particular application, but it isn't appropriate in all or even most applications.
Similar Messages
-
How to check one table exist or not in SAP
Hi, Gurus:
How to check one table exist or not in the SAP.
Thanks,Hi,
Query the table DD02L..
Select single * from DD02L where tabname = 'Your table name'
AND TABCLASS = 'TRANSP'. " For transparent tables.
Thanks
Naren -
How to change one character string to char
hi all
i got string but only one character
i got 1,2,3,E
since i got 'E' here..........
i need to convert to it to character....
but how to change it.... i only know String to integer using Integer.parseInt() method....
but i don't know about char...................You should really check the API first:
http://java.sun.com/j2se/1.4.2/docs/api/index.html
Take a look at String.charAt(int index) method.
/Kaj -
How to get one character at a specified index and put it in a mutablestring
I am new in cocoa programing and i am stock.
I am trying to get a character in a NSString and i want to put it in a NSMutableString with the command appendString.
For now it's not working. I try with different approach but i didn't find the right way to do that. It's probably very simple but i just don't see hit.
I try with characterAtIndex and with getCharater. And now i am thinking to use charcaterRange but i don't know how to articulate an NSRange.
Maybe somebody could show an example of of what i have to do to do that.
I put this <<<<<<<<<<<<<<<< to show where in my code it's not working
Thanks a lot for your help it's very appreciate.
*The header:*
#import <Cocoa/Cocoa.h>
@interface Controleur : NSObject
NSMutableArray *touche_presser;
NSMutableArray *typedevariable;
NSMutableString *formule;
int calculencours;
int i;
int n;
IBOutlet NSTextField *affichagede_laformule;
IBOutlet NSTextField *informationdesupport;
-(void) awakeFromNib;
-(IBAction)touche_clear:(id)sender;
-(IBAction)touche_0:(id)sender;
-(IBAction)touche_1:(id)sender;
-(IBAction)touche_2:(id)sender;
-(IBAction)touche_3:(id)sender;
-(IBAction)touche_4:(id)sender;
-(IBAction)touche_5:(id)sender;
-(IBAction)touche_6:(id)sender;
-(IBAction)touche_7:(id)sender;
-(IBAction)touche_8:(id)sender;
-(IBAction)touche_9:(id)sender;
-(IBAction)touche_plus:(id)sender;
-(IBAction)touche_moins:(id)sender;
-(IBAction)touche_multiplier:(id)sender;
-(IBAction)touche_diviser:(id)sender;
-(IBAction)touche_egale:(id)sender;
-(NSString *) constructionde_laformule;
-(NSNumber *) analysed_unerafale: (NSString *) elementd_uneformule;
@end
*The Methode:*
-(NSNumber *) analysed_unerafale: (NSString *) elementd_uneformule;
// Ici, j'analyse une partie de la formule et retourne le résultat (nsnumber)
// dans la variable resultatde_l_analyse_de_larafale
int ia;
int nombrede_caractere_dans_element_de_laformule;
NSNumber *resultat_actuel;
resultat_actuel = [[NSNumber alloc]initWithInt:0];
NSNumber *resultat_precedant;
resultat_precedant = [[NSNumber alloc]initWithInt:0];
NSNumber *resultatde_l_analyse_de_larafale;
resultatde_l_analyse_de_larafale = [[NSNumber alloc]init];
NSMutableString *caractere_x;
caractere_x = [[NSMutableString alloc]init];
NSMutableString *operateur;
operateur = [[NSMutableString alloc]init];
nombrede_caractere_dans_element_de_laformule = [elementd_uneformule length];
ia = 0;
for (n=1; n <= nombrede_caractere_dans_element_de_laformule; n = n+1)
ia++;
char y = [elementd_uneformule characterAtIndex:ia]; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< here
NSString *x = [[NSString alloc] initWithUTF8String: y]; //[NSString stringWithFormat:@"%@", y]; <<<<<<<<<<<<< and here
[caractere_x setString:@""];
[caractere_x appendString:x];
return resultatde_l_analyse_de_larafale;
@end
P.S.
Excuse my bad english i am french speakingI also couldn't figure out what your code is doing, but hope this sample code will help:
NSString *firstString = @"Canada";
NSMutableString *secondString = [NSMutableString stringWithCapacity:10];
int index = random() % [firstString length];
// get a substring of length 1 at the index position of firstString
NSString *oneCharString = [firstString substringWithRange:NSMakeRange(index, 1)];
// append the single-character substring to secondString:
[secondString appendString:oneCharString];
NSLog(@"firstString=%@ index=%d secondString=%@", firstString, index, secondString);
I was testing the above when your first reply was posted. It uses the same method Et suggested, but I didn't want to just throw it away. -
How to apply one character tag to paragraphs having different tags?
Hi,
I'm using FrameMaker 8 on Windows.
I'm trying to create a character tag that marks certain paragraphs so they're easier to find later. The only thing I want to change is the color. I want all the other attributes, regardless of the paragraph tag, to remain as they are.
Here's what I've done:
First, I highlighted the text to be changed. The text in this paragraph had font size 10 and regular weight.
I selected New Format from the Commands menu, named it "Rewrite" and added it to the catalog.
In the Character Designer, I set the size and weight to "As is", selected the new color, and clicked "Apply".
So far, so good - the text is the same as before in every way except the color.
Later, I wanted to mark some other text with this character tag. This text was in a paragraph that had a font size of 14 and bold weight. I highlighted the text and applied the "Rewrite" character tag. I was expecting to see the highlighted text change color, but remain the same otherwise.
However, instead of changing only the color, the character tag changed the font size to 10 and the weight to regular. It seems that, when I created the character tag and selected "As is" for the font size, this was interpreted as meaning, "Use the font size that is currently defined in this paragraph tag as the font size for this character tag." Sure enough, when I looked at the character Designer, the size was set to 10 and the weight to regular, instead of "As is" for both.
Am I misunderstanding how to use "As is?" How can I get it to work the way I want it to?
Thank you!
Joyce WermontCAVEAT: I'm working from memory, and this may work differently in later releases.
To create a completely As Is character format, deselect all text before using the character designer. The "SeSet the values for the properties you want in the format. Click Create, or Update All.
To make it work without problems, select all the text in a paragraph, but don't select the paragraph mark, then apply the character format to the selection. Applying a character format to the paragraph mark confused earlier FM releases - not sure if it's still true in later releases.
HTH
Regards,
Peter
Peter Gold
KnowHow ProServices
jwermont wrote:
Hi,
I'm using FrameMaker 8 on Windows.
I'm trying to create a character tag that marks certain paragraphs so they're easier to find later. The only thing I want to change is the color. I want all the other attributes, regardless of the paragraph tag, to remain as they are.
Here's what I've done:
First, I highlighted the text to be changed. The text in this paragraph had font size 10 and regular weight.
I selected New Format from the Commands menu, named it "Rewrite" and added it to the catalog.
In the Character Designer, I set the size and weight to "As is", selected the new color, and clicked "Apply".
So far, so good - the text is the same as before in every way except the color.
Later, I wanted to mark some other text with this character tag. This text was in a paragraph that had a font size of 14 and bold weight. I highlighted the text and applied the "Rewrite" character tag. I was expecting to see the highlighted text change color, but remain the same otherwise.
However, instead of changing only the color, the character tag changed the font size to 10 and the weight to regular. It seems that, when I created the character tag and selected "As is" for the font size, this was interpreted as meaning, "Use the font size that is currently defined in this paragraph tag as the font size for this character tag." Sure enough, when I looked at the character Designer, the size was set to 10 and the weight to regular, instead of "As is" for both.
Am I misunderstanding how to use "As is?" How can I get it to work the way I want it to?
Thank you!
Joyce Wermont -
How to check the numerica value
Dear Experts,
Would you please show me the code how to check a character value is numeric or not, include negative sign '-'.
For example the character value (01.-10) should not be a good numeric value use in later. the (-1.00) should be a good numeric value.
Thanks,
HelenHello,
Use the FM <b>NUMERIC_CHECK</b>
Regards,
Vasanth -
How to select One Check Box at a time
Dear All
I have 10 records in details blok and also I have 10 check boxes .
I want user can only check one check box at a time .
For example If first record I have checked and i am trying to check the last record then the first record UNCHECKED and the last record will checked .
Like how redio buttons work ..
How can i do that ..?
I have done like this :-
1st I have declare a global variable in PRE_FORM :GLOBAL.CNT := 'N';
Then
WHEN-CHECKBOX-CHANGED trigger
IF CHECKBOX_CHECKED(EMP.CHK') THEN
IF :GLOBAL.CNT != N THEN
:EMP.CHK := Null
HERE what to write ???
RAISE FORM_TRIGGER_FAILURE;
ELSE
:GLOBAL.CNT := Y;
END IF;
ELSE
:GLOBAL.CNT := N;
END IF;Edited by: LuKKa on Aug 29, 2012 1:12 PM
Edited by: LuKKa on Aug 29, 2012 1:13 PMLuKKa,
An easier method would be to use a Calculated Field to summarize the value of your CHECKBOX Item. For example, add a non-table item (call it SUM_CHECKED) to your detail block and do not assign it to canvas - so it will not be displayed. Then set the following properties of the SIM_CHECKED item:
Database Item = No
Calculation Mode = Summary
Summary Function = Sum
Summarized Block = <YOUR DETAIL BLOCK>
Summarized Item = <YOUR CHECKBOX ITEM>
Next, you will need to change your Detail Block property Query All Records to YES (this is required for the Calulated Item).
Now, make sure your checkbox is data type NUMBER and has the following minimum properties set:
Data Type = Number
Maximum Length = 1
Initial Value = 0
Value when Checked = 1
Value when Unchecked = 0
Check Box Mapping of Other Values = Not Allowed or Unchecked
Now, in your Checkbox Item's When-Checkbox-Changed trigger add code similar to this:
IF ( CHECKBOX_CHECKED('YOUR_DETAIL_BLOCK.YOUR_CHECKBOX_ITEM') ) THEN
IF ( :YOUR_DETAIL_BLOCK.SUM_CHECKED > 1 ) THEN
--Reset the checkbox
:YOUR_DETAIL_BLOCK.YOUR_CHECKBOX_ITEM := NULL;
MESSAGE('You can only check one item.');
Message(' ');
RAISE Form_Trigger_Failure;
END IF;
END IF;I have confirmed this method works and it is more efficient than looping through your records to see if other checkboxes are checked.
Hope this helps,
Craig B-)
If someone's response is helpful or correct, please mark it accordingly. -
Want to know how to check for new line character in text file
Hi All,
I`m trying to read data from text file. However I`m not sure whether the data is in 1st line or nth line. Now I`m trying to read the text from the readline. But if text is "" and not NULL then my code fails. So I want to know how to check for new line character and go to next line to find the data. Please help.
Thanks
static int readandwriteFile(Logger logger,String filepath){
BufferedWriter out = null;
BufferedReader in = null;
File fr = null;
int get_count = 0;
try {
if(new File(filepath).exists())
fr= new File(filepath);
System.out.println("FileName: "+fr);
if(fr != null){
in = new BufferedReader(new FileReader(fr));
String text = in.readLine();
if(text != null){
get_count = Integer.parseInt(text);
in.close();
else{
get_count = 0;
else{
out = new BufferedWriter(new FileWriter(filepath));
out.write("0");
out.close();
} //Reading of the row count file ended.
catch(Exception e) {
e.printStackTrace();
finally {
try{ if (in != null) {
in.close();
if (out != null) {
out.close();
catch(Exception e) {
e.printStackTrace();
return get_count;
}You are calling the readline() only once which means you are reading only the first line from the file...
Use a loop (Do-While preferably)
do{
//your code
}while(text == "") -
I registered two different email accounts on my iPad mini. It's only letting me check one. How can I check the other one too?
Congratuations on your new iPad!
Since your device is so new, I can state categorically that this an issue with configuration. Delete the account that doesn't work, and enter the information anew.
If you're still having problems, check that your email address and password are correct, and if possible, verify it by checking your ISP's settings. -
How to divide all textFrames in one-character-per-textFrame?
Hello:
How to divide all textFrames in one-character-per-textFrame?
Example: the textFrame "Letters" will be divided in 7 textFrames: "L", "e", "t", "t", "e", "r", "s".
Help, please.Hi Paul, try this one
#target Illustrator
// script.name = splitSelectedFramesIntoWords2.0.jsx;
// script.description = splits selected texFrames into separate words;
// script.required = select point text textFrames before running;
// script.parent = CarlosCanto; // 10/14/11
// script.elegant = false;
var idoc = app.activeDocument;
var sel = idoc.selection; // get selection
var selCount = sel.length; // count items
var tFrames = []; // to hold the textFrames
for (j=selCount ; j>0 ; j--) // loop thru selection & get textFrames backwards
tFrames[j-1] = sel[j-1];
for (k = 0 ; k<tFrames.length ; k++) // loop thru textFrames
var xpos = tFrames[k].position[0]; // get x
var ypos = tFrames[k].position[1]; // get y
var words = tFrames[k].contents.split(/\s/g); // get all words into an array
//$.writeln(words);
var space = tFrames[k].duplicate(); // dup to get width of a space
space.contents = " ";
var sw = space.width;
space.contents = words[0]; // replace space with first word
var w = space.width;
var wordCount = words.length; // count words
for (i=1; i<wordCount ; i++) // loop thru words
xpos2 = xpos+w+sw; // next words position = previous word pos+width+space
var iword = space.duplicate(); // duplicate previous word
iword.contents = words[i]; // add next word
iword.position = [xpos2,ypos]; // position the character = original position + new width
w = iword.width; // get words width
xpos = iword.position[0]; // get words position
tFrames[k].remove(); // remove textFrame -
How do I get the arrow keys to move one character at a time in the address bar or search box?
I can no longer get the arrow keys to advance or retard "one character at a time" in the address bar, the search box, or on any form in Firefox. This feature works in other browsers without a problem. The "Home" and "End" keys do not work either. How do I fix this behavior?
How do I configure the AX to connect to the hub's wireless network? It will only scan one base station Airport Express at a time in the Airport Utility. I think what I am trying to do is use the hub as a router to the two AX's. Is there a specific way to set this up?
To set up the AX to join a wireless network as a "Wireless Client," using the AirPort Utility, either connect to the AX's wireless network or temporarily connect your computer directly (using an Ethernet cable) to the Ethernet port of the AX, and then, try these settings:
Launch the AirPort Utility.
Select the AX.
If not already connected to the AX's wireless network, go ahead and switch to it when prompted.
AirPort Utility > Select the AX > Manual Setup > AirPort > Wireless
Wireless Mode: Join a wireless network
Network Name: <type in the network name/SSID of the wireless network that you want to join or select it from the pop-up menu>
Wireless Security: None OR, if you are using security on your wireless network:
Wireless Security: <Select the appropriate level of security for the existing wireless network: WPA/WPA2 Personal | WPA2 Personal>
Password: <enter your wireless network security password>
Verify Password: <re-enter the same security password>
Click Update to write the new settings to the AX. -
How do I display font one character at a time?
Right now the way I present my font is it all appears
instanenous. I don't know if this is even possible or not, but I
would like to find a way to have the font be displayed one
character at a time over the course of a variable amount of
seconds. For example, some of you might recognize this font
presentation from the game "Phoenix Wright" for the Nintendo DS:
Click
here
for example.
That is the font effect I'm trying to capture - where the
font is presented in a character by character fashion. Now
obviously I could achieve this by putting a new letter on every
frame, but let's be realistic - that's not the logical way to do
it. Does anyone know the code/options involved in making this font
display stylization logically possible? Bonus points if you know
how to make the characters mouths move with the sychronized font
and then stop once the text stops =).Place a dynamic textfield on your stage and label it myText.
In frame one place the following code,to increase the write
speed lower the value of 100 in the setinterval call:
myText.text="";
var dText="My text I want to display";
var dTmr=setInterval(ShowNextChar,100,0);
var cPos=0;
stop();
function ShowNextChar()
myText.text=myText.text+dText.substr(cPos,1);
cPos++;
if (cPos==dText.length) clearInterval(dTmr);
} -
While in MY MUSIC on itunes, all my music is unchecked. I can not check whole playlists by using the top checkmark to select all. I went to all my playlists, same thing. I can only press them ONE at a time, which will take about a day to check all of them.
any ideas? anyone have same problem? This just happened since last update.I exactly have the same problem as this "Unable to check mark whole playlists to play since last update. ONly allows me to check one at a time. How do I fix?" I have a windows7. Please help.
-
How to check how many tables used in one particular program
Hi Gurus,
I am wondering how to check for how many tables are used for one particular program whether its a custom (Y* or Z* program) or
a sap program (R*) .I have tried ST05 .But its not satisfactory .Could u help me plz in this regard .
Thanks in Advance !!!!!!!!hi,
Go with the transaction se80
select type as the Progarm
in the below block provide your program name.....
there u can find the drop down of your object related tables, types, fields, etc.....go with the tables u can find the respective information of the tables....
or
go with the se30
and enter the program name...
and go with the trips and tricks....
u can find the drop down of the
abap objects performanceexamples....
and go with the required thing.....
then u can find the required....
Cheers,
Brahma -
How to check the newline character
Hi,
I want to check a character whether it is '\n'. I tried with the code,
<code>
char nl='\n';
if(nl=='\n')
System.out.println("its a newline");
</code>
But, the above condition is not checked. How to modify the condition?Thanks in advance.
bhuvana.Remember newline characters differ on different platforms. For example under DOS its \r\n and under UNIX its \n. Thankfully you can retrieve this information using System.getProperty("line.separator");.
Here is some code
public class nl
public static void main(String args[])
String newLine = System.getProperty("line.separator");
String dos = "\r\n";
String unix = "\n";
if(newLine.equals(dos))
System.out.println("dos newline");
else if(newLine.equals(unix))
System.out.println("unix newline");
else
System.out.println("not a newline");
}I hope this helps!
Maybe you are looking for
-
Hi all, I need to create a PDF from a form, creating a Report Layout and Report Query. Use Apache Cocoon as a print server. With Microsoft Word and a complement of BI Publisher document loading design that gives me APEX data in XML and XSL, then expo
-
Ken Burns Effect in iDVD without iPhoto?
I was wondering if I can add the Ken Burns Effect in iDVD without having to make a slideshow in iPhoto and exporting.
-
I want to put a running total as alphabets. For Example 1. Question Title A) Option 1 B) Option 2 C) Option 3 2. Question Title A) Option 1 B) Option 2 C) Option 3 I got the running numbers for Question Title but i am no
-
Open pdf with the #nameddest command
Hi, I'd like to open a pdf on a defined article with the #nameddest commant from a html side. My problem is, that works only the first time. When I scroll in the pdf dokument, close the document and open it again via the html link it opens the docume
-
Toplink Delete Integrity Constraint.
I have been beating my head against my key board for a few days on this. Note: Names of packages/class names/DB info altered because I am paranoid. Excerpts from my toplink log.... Deleted Objects: Key: [588504] Identity Hash Code: 25872956 O