How to find out if a string is all alphabets

Hi,
How can I find out if a string contains all alphabets? Please help. Thanks.

Hi,
How can I find out if a string contains all
all alphabets? Please help. Thanks. I am not sure if there's easier way. But this code should do what you want:
boolean bAlpha = true;
for (int i=0; i<str.length; i++)
if (!Character.isLetter(str.charAt(i))){
bAlpha = false;
break;
//bAlpha is true if str contains only alphabets.

Similar Messages

  • How to find out index of string

    Hi,
    Can you help me to find out index of following strting.
    "sss.xxxxx_pain.001.001.02_1002225618.xml"
    need to get value "1002225618".
    ideally i need to get the value inbetween after second "_"  and value before ".xml".
    Thanks
    Mahi

    Hi Mahi,
    UDF should be like this:
    If you do not want .xml in the out replace statement
    var1=var1.substring(sublen+1, len);
    with
    var1=var1.substring(sublen+1, len-4);
    Regards,
    Krupa

  • How to find out what a string contains?

    I'm in the process of writing an XML parser for a project that I am working on. There will be one field in the XML that can be used to store an int, a date, or a string. I need to figure out a way to determine if that field contains an int, a date, or a string without modifying the XML at all. Meaning I can't just put an indicator in the XML itself. So given the string of data from the xml, how do I figure out what it is so that I can convert it to that type?
    Any help would be appreciated as I don't have much time left to work on this.

    How are you going to be able to tell?
    There will be one field
    in the XML that can be used to store an int, a date,
    or a string. "20010101" fits all three. In the absence of any other information, there's no way to tell what the sender meant the type to be.
    Now, if you assume some formatting information, then you have a chance. Let's say that "dates" MUST be in the format "YYYY-mm-dd hh:MM:ss". Use SimpleDateFormat and Calendar and try to parse the string. If it works - it's a Date.
    If it doesn't work - try to parse it as an Integer. If it works - it's an int.
    If THAT doesn't work - give up and just use the String.
    Does that help?
    Grant

  • How to find out whether the String contains chinese characters

    I need to check if the string contains chinese characters in Java. Does anyone know how to do it? thx.

    Since Java strings contain UNICODE code points, check the content against the relevant page here - http://www.unicode.org/charts/ .

  • How to find out the exact string in a single line?

    Hi,
    I have some data in table like below.
    CERTTEST
    CERT TEST
    CERT
    My requirement is fetch only CERT as a output.
    Please share your thoughts.
    Thanks

    Not sure what's the issue:
    with t as (
               select 'CERTTEST' str from dual union all
               select 'CERT TEST' from dual union all
               select 'CERT' from dual
    -- end of data sample
    select  str
      from  t
      where str = 'CERT'
    STR
    CERT
    SQL> SY.
    P.S. And if you need to seclect case insensitive CERT, use:
    SQL> with t as (
      2             select 'CERTTEST' str from dual union all
      3             select 'CERT TEST' from dual union all
      4             select 'CeRt' from dual union all
      5             select 'CERT' from dual
      6            )
      7  -- end of data sample
      8  select  str
      9    from  t
    10    where upper(str) = 'CERT'
    11  /
    STR
    CeRt
    CERT
    SQL>

  • How to find out if a string has 2 letters

    I am making an app in which I am getting information from a date selector and if the selected date is, for example, 1, it needs to be 01, so I need to get a command that can tell if the text has 2 digits.
    For example:
    if (dateTime.Value.Month.ToString() == TwoDigits)
    ToMonth_Text.Text = dateTime.Value.Month.ToString();
    else
    //Month for To Date
    if (dateTime2.Value.Month.ToString() == "1")
    ToMonth_Text.Text = "01";
    if (dateTime2.Value.Month.ToString() == "2")
    ToMonth_Text.Text = "02";
    if (dateTime2.Value.Month.ToString() == "3")
    ToMonth_Text.Text = "03";
    //And so on....
    Zack Bowling

    Thanks, this worked for me. Here's my code I used for any future people who have the issue:
    private void To_Closed(object sender, EventArgs e)
    var dateTime2 = To_Text.Value;
    ToMonth_Text.Text = dateTime2.Value.Month.ToString();
    ToDay_Text.Text = dateTime2.Value.Day.ToString();
    if (ToMonth_Text.Text.Length == 2)
    ToMonth_Text.Text = dateTime2.Value.Month.ToString();
    else
    //Month for To Date
    if (dateTime2.Value.Month.ToString() == "1")
    ToMonth_Text.Text = "01";
    if (dateTime2.Value.Month.ToString() == "2")
    ToMonth_Text.Text = "02";
    if (dateTime2.Value.Month.ToString() == "3")
    ToMonth_Text.Text = "03";
    if (ToDay_Text.Text.Length == 2)
    ToDay_Text.Text = dateTime2.Value.Day.ToString();
    else
    //Day for To Date
    if (dateTime2.Value.Day.ToString() == "1")
    ToDay_Text.Text = "01";
    if (dateTime2.Value.Day.ToString() == "2")
    ToDay_Text.Text = "02";
    if (dateTime2.Value.Day.ToString() == "3")
    ToDay_Text.Text = "03";
    Zack Bowling

  • How to find out the IP@s of all nodes in a cluster?

    Is there any way to retrieve the IP addresses of all nodes in a cluster?
    The problem is the following. We intend to write an administration program
    that administers all nodes of a cluster using rmi (e.g. tell all singletons
    in the cluster to reload configuration values etc.). My understanding is
    that rmi only talks to a single node in a cluster. It would be a convenient
    feature if the administration program could figure out all nodes in a
    cluster by itself and then administers each node sequentially. So far we're
    planning to pass all IP addresses to the administration program e.g. as
    command line arguments but what if a node gets left out due to human error?
    Thanks for your help.
    Bernie

    There is no public interface to inquire about the IP addresses of the servers in a cluster. If you use WLS 6.0, there is an administrative console that uses JMX to manage the cluster. Perhaps that would be of use to you?
    Bernhard Lenz wrote:
    Is there any way to retrieve the IP addresses of all nodes in a cluster?
    The problem is the following. We intend to write an administration program
    that administers all nodes of a cluster using rmi (e.g. tell all singletons
    in the cluster to reload configuration values etc.). My understanding is
    that rmi only talks to a single node in a cluster. It would be a convenient
    feature if the administration program could figure out all nodes in a
    cluster by itself and then administers each node sequentially. So far we're
    planning to pass all IP addresses to the administration program e.g. as
    command line arguments but what if a node gets left out due to human error?
    Thanks for your help.
    Bernie

  • How to find out if there are repeated characters in a string

    hey guys
    well i kinda have a little problem figuring out how to find out
    if there are repeated characters in a string.
    if anyone can help, would appreciate it.
    thanks
    milos

    Try using the StringTokenizer class. if u already know which character to trace. this could do the job.
    eg. String str = "here and there its everywhere";
    StringTokenizer st = new StringTokenizer(str, "e");
    int rep = st.countTokens();

  • How to find out how many space character in setence (string var) ?

    Dear all Master,
    I need Your help please.
    Topic:
    Script Editor.
    My System:
    -CUCM 7.0
    -UCCX 7.0 premium
    -Nuance recognizer 9.0
    Question:
    ABC = string var.
    ABC = "this is sample"
    2 space character in ABC string var.
    How to find out how many space character in ABC var ?
    Regards,
    Susanto

    Hi
    Create a int variable called whatever you want, then insert a SET step.
    Set the variable to the new int you created, and then paste this into the 'value' field:
    String[] myarray = teststring.split(" ");
    return myarray.length -1 ;
    Basically it splits the string into chunks each time it hits the " " character.
    This results in an array of the resulting chunks (i.e. words), which is one more than the number of spaces. -1 from that, and you have your int variable set to the number of spaces.
    Regards
    Aaron
    Please rate helpful posts...

  • How to find out which type of the driver is used in our application?

    Hi all,
    can anyone tell me how to find out which type of the driver is used in our application?
    Thanks in advance,
    Phoeniox

    Hi,
    Check out this...
    Class.forName("com.mysql.jdbc.Driver"); //if u r using MySql
    List drivers = Collections.list(DriverManager.getDrivers());
                   for(int i=0;i<drivers.size();i++)
                        Driver driver = (Driver)drivers.get(i);
                        String driverName = driver.getClass().getName();
                        System.out.println("Driver "+i+":::"+driverName);
    you need to load the driver and display in the same program.
    Then only you'l get the required result.
    prakhyath

  • How to find out when data was deleted from table in oracle and Who deleted that

    HI Experts,
    Help me for below query:
    how to find out when data was deleted from table in oracle and Who deleted that ?
    I did that to fidn out some data from dba_tab_modifications, but I m not sure that what timestamp shows, wether it shows for update,insert or delete time ?
    SQL> select TABLE_OWNER,TABLE_NAME,INSERTS,UPDATES,DELETES,TIMESTAMP,DROP_SEGMENTS,TRUNCATED from dba_tab_modifications where TABLE_NAME='F9001';
    TABLE_OWNER                    TABLE_NAME                        INSERTS    UPDATES    DELETES     TIMESTAMP         DROP_SEGMENTS TRU
    PRODCTL                        F9001                                                     1683         46       2171            11-12-13 18:23:39             0                   NO
    Audit is enable in my enviroment?
    customer is facing the issue and data missing in the table and I told him that yes there is a delete at 11-12-13 18:23:39 in table after seeing the DELETS column and timestamp in dba_tab_modifications, but not sure I am right or not
    SQL> show parameter audit
    NAME                                 TYPE        VALUE
    audit_file_dest                      string      /oracle/admin/pbowe/adump
    audit_sys_operations                 boolean     TRUE
    audit_syslog_level                   string
    audit_trail                          string      DB, EXTENDED
    please help
    Thanks
    Sam

    LOGMiner --> Using LogMiner to Analyze Redo Log Files
    AUDIT --> Configuring and Administering Auditing

  • How to find out structure of internal table?

    Hi
    is there any way how to find out name of structure upon which internal
    table was created?
    i got internal table passed to function module by any table
    type. There can be different types of table passed in. Inside of
    module a need to find out the structure of table.
    I've found a tricky way how to find this information using following
    command 'DESCRIBE FIELD dobj INTO td.', but its probably not a correct
    way because using this command is not recommended in application
    programs.
    Is there any function module, or something i can use for getting this information?
    Thanks

    Thanks very much
    This has solved my problem:
      DATA descr_ref TYPE ref to cl_abap_typedescr.
      DATA tabname TYPE string.
      descr_ref = cl_abap_typedescr=>describe_by_data( itab ).
      tabname = descr_ref->absolute_name.

  • How to find out each Cell having Data or Not in Excel File by Using WDJ

    Hi Friends,
    I have one doubt on WDJ.
    I have to Upload Excel File. Click on Upload Button in Excel file Data will move to One Bapi. This is I was done. But my Requirement is if any empty Cell in Excel That File not uploaded it display one error message Please upload Correct Excel File
    How to find out each Cell having Data or Not in Excel File by Using WDJ. Please tell me.
    By Using this Code I have Upload Excel File
    InputStream text = null;
         int temp = 0;
         //wdComponentAPI.getMessageManager().reportSuccess("filePath Vijay:::");
         try
                   File file = new File(wdContext.currentContextElement().getResource().getResourceName().toString());     
    FileOutputStream op = new FileOutputStream(file);
                   if (wdContext.currentContextElement().getResource()!= null)
                          text = wdContext.currentContextElement().getResource().read(false);
                             while((temp=text.read())!= -1)
                                  op.write(temp);
                                  op.flush();
                                  op.close();
                                  path = file.getAbsolutePath();
                                  //wdComponentAPI.getMessageManager().reportSuccess("Path Name :::::"+path);
         catch(Exception ex)               
                   ex.printStackTrace();
    But my Requirement is If excel having any Empty Cell that excel file not uploaded.How to do this...
    Regards
    Vijay Kalluri

    Hi my friend
    I would like to share you some APACHE APi´s that i use when i have to read excel files in Web Dynpro.
    JAR = poi-3.2-FINAL-20081019.jar
    Some Example:
    POIFSFileSystem fs;
    HSSFWorkbook wb;
    HSSFSheet sheet;
    String myMexican_ValueFromExcelis = "";
    try {
             fs = new POIFSFileSystem(new FileInputStream();
             // and select the cell "y"
            cell = row.getCell( 0 );
            myMexican_ValueFromExcelis = cell.getCellValue();  
    }cach(Exception e){
    REgargds

  • How to find out selected AssignedStory or Link?

    Hello to all,
    can anyone pls. explain how to find out which assigned story or link is selected at the time the script is fired.
    My problem is this: I would like to place an image into selected rectangle which is exported into .icml. So, for example, you have few exported rectangles and you would like to place an image into the one which is selected (through link or assignment panel). Because you can not select a rectangle in InCopy like you can in InDesign I tried to take a look through assigned stories...
                       For aCounter As Integer = 1 To myDocument.Assignments.Count
                            Dim myAssignment As InCopy.Assignment = myDocument.Assignments.Item(aCounter)
                            For sCounter As Integer = 1 To myAssignment.AssignedStories.Count
                                Dim myAssignedStory As InCopy.AssignedStory = myAssignment.AssignedStories.Item(sCounter)
                                Dim myStoryRef As Object = myAssignedStory.StoryReference
                                find out if assigned story or story reference is selected
                                'Rectangle
                                If TypeName(myStoryRef) = "Rectangle" Then
                                    Dim myObjectRectangle As InCopy.Rectangle = myStoryRef
                                    If myObjectRectangle.Graphics.Count = 0 And myObjectRectangle.Images.Count = 0 Then
                                        'CheckOut if needed
                                        'Place Media
                                    End If
                                End If
                            Next
                        Next
    Kind regards,
    Marko

    Well,
    I couldn't solve this without using a placeholder image. I found that you need to check if the selection is an image and than replace that image... So something like this below:
                    'Check if there is a selected image for relink
                    If myDocument.Selection.Count = 1 Then
                        If TypeName(myDocument.Selection.Item(1)) = "Image" Then
                            myImage = myDocument.Selection.Item(1)
                            myImageLink = myImage.ItemLink
                            Dim msgRet As MsgBoxResult = MsgBox("Would you like to relink selected image?", MsgBoxStyle.YesNoCancel, "Relink seleceted image?")
                            If msgRet = MsgBoxResult.Yes Then
                                        ' DO some action
                                        Dim MediaLink As String = something...
                                                'CheckOut action
                                                If myCheckOutMenu.AssociatedMenuAction.Enabled() Then
                                                    myCheckOutMenu.AssociatedMenuAction.Invoke()
                                                End If
                                                myImageLink.Relink(fileLink)
                                                Try
                                                    myImageLink.Update()
                                                Catch
                                                End Try
    Hope this helps.
    Regards,
    Marko

  • How to find out the file name

    Hi,
    In selection screen (parameter) user will give input TXT file from presentation server to upload to SAP. I need to capture the file name only but not the path and need to concatenate with date stamp and need to download error log in XLS file to presentation server.
    How to find out the file name from selection screen?
    I searched SCN threads but not found relavant solution.
    Thanks,
    R Kumar

    Hi
    This code gets only filename from selection screen :
    REPORT x.
    PARAMETERS p_file(100).
    DATA : gv_full_path LIKE  ibipparms-path,
           gv_full_path_string TYPE string,
           gv_filename(100),
           gv_file_ext(3).
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    Ask user to select file with a popup :
      CALL FUNCTION 'F4_FILENAME'
        IMPORTING
          file_name = gv_full_path.
    Get filename from path :
      gv_full_path_string = gv_full_path.
      CALL FUNCTION 'CH_SPLIT_FILENAME'
        EXPORTING
          complete_filename = gv_full_path_string
        IMPORTING
          extension         = gv_file_ext
          name              = gv_filename.
      CONCATENATE gv_filename '.' gv_file_ext INTO gv_filename.
      p_file = gv_filename.
    I hope it helps.

Maybe you are looking for

  • Need help converting MS SQL query into Oracle, Function 'WHERE' issues

    SELECT PERS_NBR, PAY_ID, PAY_CODE, LOGICAL_DATE, LOGICAL_DATE AS END_DATE, PCNAMES + REPLICATE(',', 39 - (LEN(PCNAMES) - LEN(REPLACE(PCNAMES, ',', '')))) AS PC_NAMES_FINAL FROM (SELECT DISTINCT A.PAY_ID, A.PAY_CODE, A.PERS_NBR, A.LOGICAL_DATE, PCNAME

  • Golden Gate

    Hi, I have installed 11g R2 Golden gate one way replication for non rac database. once i started the extract in source database its shows running, but while checking status of extract, its showing stopped.and replicat getting same issue. Thanks in ad

  • OracleTuxedo 11g present SVCTIMEOUT Block to call package in Oracle 9i

    Good Afternoon It shows me an error SVCTIMEOUT calling a stored procedure contained in a package. Stop the Tuxedo process and the service does not continue to work, killing the process. Running the package in SQLPlus working properly Annex the error

  • Voice command in Cisco Unity Connection

            I'm currently using Unity Connection 8.5.1 with Cisco Unified CallManager version  7.1.5.  I'm trying to see where I can make sure our Class of Service is correct for the Unity Connection voice command and am unable to find anything. Can anyo

  • Tables Horisontal Scrolling

    Hellow. I have a problem with JTable. This is code of my simple programm: StClass.java import javax.swing.*; public class StClass     public static void main(String []args)         JFrame frm = new JFrame();         MyTab tb = new MyTab();         JS