*****Assignment Operator Question - String Operations*****

There's a lot of code here, but my question pertains to the italicized portion. I am assigning one StringObject to another. But when the assignment is tested with a System.out.println in the TestStringObject class, it doesn't look like the assignment has occurred properly. Even thought the string is reversed with the myObj.reverse() method, when the object is printed to the screen, it does not appear to be reversed. Is there really a problem with the way the assignment is occurring or am I misunderstanding the way assignment occurs in Java. By the way, the TestStringObject class must stay as is, but the StringObject code can be modified. Thanks!
class TestStringObject{
   public static void main(String [] args){
      StringObject myObj, yourObj;
      myObj = new StringObject("Hello-World!!! Java/is/awesome.");
      yourObj = new StringObject("a man a plan a canal panama");
      myObj.stripCharacters("-!/.");
      myObj.displayStringObject();
      System.out.println();
      myObj.reverse();
      myObj.displayStringObject();
      System.out.println();
      yourObj.stripCharacters(" ");
      System.out.print("yourObj = ");
      yourObj.displayStringObject();
      System.out.println();
myObj = new StringObject(yourObj.getStore());
myObj.reverse();
System.out.print("myObj = ");
myObj.displayStringObject();
System.out.println();
if(myObj.equals(yourObj))
System.out.println("they are equal");
else
System.out.println("they are not equal");
import java.lang.String.*;
class StringObject{
   private String store;
   private int storeLength;
   public StringObject(String s){
   //Creates a new StringObject by saving the string s in
   //the instance variable store and its length in
   //the instance variable storeLength.
   store = new String(s);
   storeLength = store.length();
   public void displayStringObject(){
   //Display the instance variable store.
   System.out.println(store);
   public void reverse(){
   //Updates store to hold the reverse of its contents.
   String reverseString = new String();
   char reverseLetter;
   for (int z = storeLength - 1; z > -1; --z){
       reverseLetter = store.charAt(z);
       reverseString = reverseString + reverseLetter;
   store = reverseString;
   public void stripCharacters(String stg){
   //Update store to hold its contents after each of the
   //characters in stg has been removed.
   int tempLength = stg.length();
   char newChar;
   for (int i = 0; i < tempLength; i++){
       newChar = stg.charAt(i);
       stripACharacter(newChar);
       storeLength = store.length();
   public boolean equals(StringObject sObj){ 
   //Determines if the store in sObj is identical to
   //the store in the receiver without regard to case.
   String newStore = sObj.store;
   if (newStore.equalsIgnoreCase(store))
      return true;
   else
      return false;  
   public String getStore(){
   //Return the store to the caller.
   return store;
   private void stripACharacter(char ch){
   //Update store to contain its contents after every occurrence
   //of character ch has been removed.
   String testString = new String();
   char letter;
   for (int x = 0; x < storeLength; x++){
       letter = store.charAt(x);
       if (letter != ch){
          testString = testString + letter;
   store = testString;
The Output:
D:\CMU>java TestStringObject
HelloWorld Javaisawesome
emosewasiavaJ dlroWolleH
yourObj = amanaplanacanalpanama
myObj = amanaplanacanalpanama
they are equal

It looks to me like your output is correct. What were you expecting when you compared a palindrome to its reverse?
I changed it to something that is not the same in both directions and got this output, which is also correct:HelloWorld Javaisawesome
emosewasiavaJ dlroWolleH
yourObj = abcdefg
myObj = gfedcba
they are not equal

Similar Messages

  • To use Character string operator in ABAP

    HI,
    I have a problem with joining the two fields with different data length i.e
    OBJKY has length (30).
    tknum has length (10).
    the above read table i_nast works as long as both has the records not greater than 10 and I do have some records with greater than 10 for OBJKY in the database and my read is failing at that scenario, I need to use a charater string operator, as I am new to ABAP, can any one suggest me how to do .
    ...SQL..
    select OBJKY DATVR from nast
    into corresponding fields of table i_nast
    where KSCHL = 'ZBOL'.
    sort i_nast by OBJKY.
    LOOP at i_ship_data.
    read table i_nast with key
    OBJKY = i_ship_data-tknum binary search.
    if sy-subrc = 0.
    move: i_nast-datvr to i_ship_data-datvr.
    endif.
    modift i_ship_data.
    ENDLOOP.

    HI,
    Since OBJKY and TKNUM are with different lengths the Read statement works only
    when OBJKY has a 10 character value identical to TKNUM.
    but if we can assume that only first 10 characters of OBJKY are to be comapred with TKNUM then we can try the under mentioned approach:
    Create a new field in the Internal table I_NAST with length 10 characters.(I_NAST-OBJKY_TEMP).
    now assign the first 10 characters of OBJKY to this new field :
    LOOP AT I_NAST.
    MOVE I_INAST-OBJKY+0(10) TO OBJKY_TEMP.
    MODIFY I_NAST.
    ENDLOOP.
    Now you can Modify your READ STATEMENT :
    LOOP at i_ship_data.
    read table i_nast with key
    OBJKY_TEMP = i_ship_data-tknum binary search.
    if sy-subrc = 0.
    move: i_nast-datvr to i_ship_data-datvr.
    endif.
    modift i_ship_data.
    ENDLOOP.
    Hope this will help.
    Note: You can pick up any 10 characters starting from 1 to 20 th character of the field
    I_INAST-OBJKY.
    Reward Points if found helpfull..
    Cheers,
    Chandra Sekhar.

  • String operations on internal table text....

    Original table is consists of 2 columns:
    E        
    RFC error(SM_DHTCLNT010_READ): Error when opening connection
    E RFC error(SM_DHLCLNT010_READ): Error when opening connection
    E RFC error(SM_DHKCLNT010_READ): Error when opening connection
    E RFC error(SM_E10CLNT000_READ): 'tdhtci00.emea.gdc:sapgw02' E     No read RFC FOR SM_B72CLNT003_READ
    E     No read RFC FOR SM_B71CLNT003_READ
    S     Clients for system 'E21' found in RFC  'SM_E21CLNT001_READ'
    S     Clients for system 'E22' found in RFC  'SM_E22CLNT001_READ'
    S     Clients for system 'E23' found in RFC  'SM_E22CLNT001_READ'
    Now we need to apply string operations such that result table is 3 columns with new refined message:
    status       sid            
    Message NEW_TEXT
    E     DHT         
    RFC error               Error when opening connectionE     DHL         RFC error                       Error when opening connection
    E     DHK         RFC error                       Error when opening connection
    E     E10       RFC error                      tdhtci00.emea.gdc:sapgw02
    E     B72        No RFC LINK
    E     B71        No RFC LINK
    S     E21        DATA READ
    S     E22       DATA READ
    S     E23       DATA READ
    String conditions to arrive at new table is:
    1) to get SID column : the conditions are
    •     If the Status is “RFC Error” then next 3 Characters after the “_” must be extracted as SID
    •     Else the SID is between the first and the second inverted comma ‘
    Example:  Clients for system 'E21' found in RFC  'SM_E21CLNT001_READ'extracts “E21” as SID
    2) for message column
    ·         message “RFC Error” if the message text
    starts with “RFC Error”
    · message “no RFC Link” if the message text starts with “No read RFC*”
    · message “Data Read” if the Substring “found in RFC”</b> was found in the Message      
    3) •     If the Status is “RFC Error” then the whole Textstring behind the “: “ must be Extracted
    For example if message is RFC error(SM_DHLCLNT010_READ): Error when opening connection NEW_TEXT will be Error when opening connection
    Need ur inputs on these.
    Bset regards,
    Subba

    Hi,
    this u can acheive simply using offset:
    var_name+off(len). "
    e.g. wa_message-fld+0(3) = first threee characters
    wa_message-fld(3) same as above first three characters
    wa_message-fld+2(2) " will display second and third characte of wa_message-fld
    this u can use to set condtions like :
    if wa_message-fld(9) = 'RFC Error'.
    "process here
    endif.
    Hope this will help u...
    Jogdand M B

  • String operations in internal table

    Dear friends..
            Good morning.
                        I wish to know.. how i segregate the field from a database table to internal table into two different internal table field. say for example.
    i have db table tab1 which has field number
    tab1 -> number
    and i have another internal table itab1 whic has two fields numa and numb
    tab1 -> numa
         -> numb
    i have value in tab1->number is 001 and 0001
    i wish to segregate this two values in to internal table
    if the value is 001 then it should be into 001 -> numa
    if the value is 0001 then it should be into 0001-> numb
    i dont know how to perform the string operations in internal table.. would you like to tell me how i fix this problem any suggetion, article, code will be great help of mine..
    thanking you
    Regards
    Naim

    Hi,
      what u can do is check the lenth
    lit_data_tab.
    lit_data_3
    lit_data_4.
    lv_char3 type char3.
    lv_char4 type char4.
    lv_length type i.
    loop at lit_data_tab.
    lv_length = STRLEN ( lit_data_tab-value ).
    if lv_length = 3.
       lv_char3 = lit_data_tab-value .
       append lv_char3 to lv_char3 type char3.
    else.
       lv_char4 = lit_data_tab-value .
       append lv_char4 to lv_char3 type char4.
    endif.
    endloop.
    if u want
    numa  numb
    003   0003.
    then u have to loop in one table and modify other.
    that is any one table should contains both the field.
    read the table with one field
    mark helpfull answers
    Regards
    Message was edited by: Manoj Gupta

  • Efficiency of Java String operations

    Hi,
    for an Information Retrieval project, I need to make extensive use of String operations on a vast number of documents, and in particular involving lots of substring() operations.
    I'd like to get a feeling how efficient the substring() method of java.lang.String is implemented just to understand whether trying to optimize it would be a reasonable option (I was thinking of an algorithm for efficient string pattern matching such as the Knuth-Morris-Pratt algorithm, but if java.lang.String already applies similarly efficient algorithms I would not bother).
    Can someone help?
    J

    Thanks for your comment. Yes of course you're right, I
    mean indexOf(). If so (thanks DrClap), let me enter the discussion.
    The indexOf() implements a so called "brute force algorithm".
    The performance is O(n*m), where n is the length of the text, and
    m is the length of the pattern, but is close to n on the average.
    The KMP is O(n), so the performance gain should be hardly noticeable.
    To get a real performance gain you should look at the BM (Boyer-Moore,
    O(n/m)) algorithm or some of its descendants.
    As for java.util.regex package, as far as i understand it should be
    several times slower than indexOf(), because it reads EACH character through an interface method (as opposed to direct array access in indexOf()).
    Though it's still to be proved experimentally.

  • Using OR operator with string

    How we can use OR operator with string in java??

    Gaurav1 wrote:
    its logical OR operator;how can we use it with matcher classLike its been said already. The "logical OR" is used the same everywhere.
    Why don't you post the code you're having problems with. (Only the relevant areas, please. And use code tags.)

  • String.concat() vs + operator in strings concatenations

    Whats the difference between String.concat() and + operator in strings concatenation?
    I cant find any functional one.
    Are there any performance differences?
    Thanks

    TM-Nite wrote:
    Whats the difference between String.concat() and + operator in strings concatenation?
    I cant find any functional one.There isn't any for all one can tell from the API docs. More details would be up to the String implementation.
    Are there any performance differences?No. Both are bad if repeated a lot, as long as there aren't exclusively compile-time constants involved. Use StringBuilder/StringBuffer instead, in those cases.

  • [svn:bz-trunk] 18053: BLZ-571: Use of wrong operator in string comparison in flex.messaging.VersionInfo. java

    Revision: 18053
    Revision: 18053
    Author:   [email protected]
    Date:     2010-10-07 03:27:37 -0700 (Thu, 07 Oct 2010)
    Log Message:
    BLZ-571: Use of wrong operator in string comparison in flex.messaging.VersionInfo.java
    Updated the code to use the right operator.
    Check-in Tests: PASS
    QA: Yes
    Ticket Links:
        http://bugs.adobe.com/jira/browse/BLZ-571
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/VersionInfo.java

  • Math Addition Operator Question

    Hi there,
    I'm trying to write a very simple math equation:
    var gal_width = 100;
    var m_box_pos = 2000;
    var total = (gal_width+m_box_pos);
    When I display this in a text element, the numbers are shown together rather than being added together
    (eg: 1002000)
    I get the feeling Edge is interpreting the + as a string operator rather than a math operator.
    Replacing the + with a - (as a test), the 2 numbers are being subtracted.
    Multiplying the numbers with the * operator also works as it should.
    I've tried many configerations, escaping the operator with no luck.
    Any ideas of how to get addition to work?
    Thanks

    Hi 29sketc.
    console.log( sym.$("text_111").text());
    // logs : 111
    console.log(typeof sym.$("text_111").text());
    // logs : string
    var number_222 = 222;
    console.log(typeof number_222);
    // logs : number
    console.log( sym.$("text_111").text() +number_222);
    // logs : 111222
    text() has produced a String so + is interpreted here as string concatenation.
    var number_111 = 111;
    console.log(typeof number_111);
    // logs : number
    console.log(number_111 +number_222);
    // logs : 333
    When you have two Number variables + is interpreted  as addition.
    Gil

  • Question about operating system

    Hello.
    I just got lenovo T400. I have question about operating system. I choose OS (Windows XP Professional preinstalled through downgrade rights in Genuine Windows 7 Professional). When I get the laptop, Windows XP is preinstalled but I don’t know how to upgrade to Window 7. Please, tell me the way to upgrade.
    Have a nice day

    you'd need the disks, and would need to do a fresh install, i.e. you can't just upgrade it. everything will be gone  
    T400s - 2815RW1 + Win7 Ultimate
    Don't pm me for help! That's what the forum is for. Also, Google's nicer than me. Ask him.

  • Perl versus other "scripting" languages when doing string operations

    I've been told that perl is a "scripting" language like the other languages mentioned in this forum.
    If that's true, can these other languages handle the following spec as well as perl can?  (See spec at end of this post.)
    Or is perl stronger in string operations than the other scripting languages mentioned here?
    Here's the spec:
    1. I give your program  a twenty-letter alphabet (any twenty letter alphabet)
    For example:
    ABCDEFGHIJKLMNOPQRST
    2.  I also give your program four groups (any four groups) of letters in this alphabet:
    For example:
    s:  A,B,C,D,E
    p:  F,G,H,I,J
    d:  K,L,M,N,O
    e:  P,Q,R,S,T
    3.  I also give your program a sequence over the twenty-letter alphabet that I gave you in Step (1) above:
    For example:
    ABCDEFGHIJKLMNOPQRSTSRQPONMLKJIHGFEDCBA
    4.  Given this sequence,you search for pairs of adjacent letters (x,y) where X and y are from different groups (the groups defined in Step (2) above.)
    Also, you return the results of this search by giving me back the following two strings:
    ABCD(EF)GHI(JK)LMN(OP)QRSTSRQ(PO)NML(KJ)IHG(FE)DCBA  
    ABCD(sp)GHI(pd)LMN(de)QRSTSRQ(ed)NML(dp)IHG(ps)DCBA
    5.  Note: if I give you a sequence that contains "overlapping" ordered pairs like:
    ...EFK...
    then you ignore the second ordered pair.  That is, you return:
    ...(EF)K

    OK - here is the final stuff on the "C" side.
    To execute the program, the command line is:
    20let.exe file1.txt file2.txt file3.txt > fileout.txt
    Below, I've provided:
    a) source code 20let.c
    b) sample input file1.txt
    c) sample input file2.txt
    d) sample input file3.txt
    e) output fileout.txt generated from these input files.
    As soon as Bill finishes the perl version of the source code, I'll post that also.
    source code of 20let.c
    // 20let.c5
    #include <stdio.h>
    #include <stdlib.h>
    int T[333],A[99999],G[333],B[99999],C[99999],N[299999],P[99999];
    int n1,n2,f,p,x1,x2,n,m,a,b,c,i,j,k,x,y,z;
    int E[233][233];
    FILE *file;
    int substrings(int x1,int x2);
    int main(int argc, char*argv[]) {
        if(argc<3){
            printf("\nusage:20let protein-file nucleotide-file pairs-include-file\n\n");
            printf("marks amino-acid-pairs from different groups in protein-file\n");
            printf("iff they are in the include-file\n");
            exit(1);
    //----------------define the groups        G['I'] = 's', e.g.
        x='s'; G['I']=x;G['M']=x;G['V']=x;G['A']=x;G['G']=x;
        x='p'; G['F']=x;G['L']=x;G['P']=x;G['W']=x;G['W']=x;
        x='d'; G['H']=x;G['Q']=x;G['D']=x;G['E']=x;G['E']=x;
        x='t'; G['S']=x;G['T']=x;G['Y']=x;G['N']=x;G['C']=x;G['K']=x;G['R']=x;
    //----------------the 4 bases              T['a'] = 0 thru 3
        for(x=0;x<222;x++)
            T[x]=-999;
        T['a']=0;T['c']=1;T['g']=2;T['t']=3;
        T['A']=0;T['C']=1;T['G']=2;T['T']=3;
      for(i=65;i<70;i++)G<i>='s';
      for(i=70;i<75;i++)G<i>='p';
      for(i=75;i<80;i++)G<i>='d';
      for(i=80;i<85;i++)G<i>='t';
    //---------------- read include-file   file3 xxxyyy pairs E[x][y] of interest
        f=0;
        for(x=0;x<222;x++)
            for(y=0;y<222;y++)
                E[x][y]=0;
        if((file=fopen(argv[3],"rb"))==NULL){
            printf("\ncan't open exclude-file %s\n",argv[1]);exit(1);
    mq1: if(feof(file))
            goto mq3;
        x=fgetc(file);y=fgetc(file);x=fgetc(file);
        x=T[fgetc(file)]*16+T[fgetc(file)]*4+T[fgetc(file)];
        y=T[fgetc(file)]*16+T[fgetc(file)]*4+T[fgetc(file)];
        if(x<64 && x>=0 && y<64 && y>=0){
            E[x][y]=1;
            f++;
    mq2: if(feof(file))
            goto mq3;
        a=fgetc(file);
        if(a!=10)
            goto mq2;
        goto mq1;
    mq3: fclose(file);
    //------------------read amino-acid file    file1 == P array
        if((file=fopen(argv[1],"rb"))==NULL){
            printf("\ncan't open file %s\n",argv[1]);exit(1);}
        p=0;
    m1p: if(feof(file))
            goto m2p;
        p++;
        P[p]=fgetc(file);
        if(G[P[p]]==0)
            p--;
        goto m1p;
    m2p:;
        fclose(file);
    //------------------read nucleotide file    file2 == N array
        if((file=fopen(argv[2],"rb"))==NULL){
            printf("\ncan't open file %s\n",argv[1]);exit(1);
        n=0;
    m1n: if(feof(file))
            goto m2n;
        n++;
        N[n]=fgetc(file);
        if(N[n]!='a' && N[n]!='c' && N[n]!='g' && N[n]!='t')
            n--;
        goto m1n;
    m2n:;
        fclose(file);
    //for(i=1;i<=p;i++)printf("%c",P<i>);printf("\n");
    //for(i=1;i<=n;i++)printf("%c",N<i>);printf("\n");
    //printf("%i include-pairs  %i nucleotides  %i proteins\n",f,n,p);
    //------------1st line------------------       B<i> = result
        m=0;
        for(i=1;i<=p;i++){
            n1=T[N[i*3-2]]*16+T[N[i*3-1]]*4+T[N[i*3]];
            n2=T[N[i*3+1]]*16+T[N[i*3+2]]*4+T[N[i*3+3]];
    //printf("\ni=%i p=%i n1=%i n2=%i\n",i,p,n1,n2);
            if(E[n1][n2]<1 || G[P<i>]==G[P[i+1]] /* || i==n */){
                printf("%c",P<i>);
                m++;
                B[m]=P<i>;
                goto m3;
            printf("(%c%c)",P<i>,P[i+1]);
            i++;
            m++;
            B[m]='(';
            m++;
            B[m]=P[i-1];
            m++;
            B[m]=P<i>;
            m++;
            B[m]=')';
    //printf("(%c)%c",G[A<i>],G[A[i+1]]);i++;
        m3:;
        printf("\n");
    //------------2nd line------------------       C<i> = result
        m=0;
        for(i=1;i<=p;i++){
            n1=T[N[i*3-2]]*16+T[N[i*3-1]]*4+T[N[i*3]];
            n2=T[N[i*3+1]]*16+T[N[i*3+2]]*4+T[N[i*3+3]];
            if(E[n1][n2]<1 || G[P<i>]==G[P[i+1]] /* || i==n */){
                printf("%c",P<i>);
                m++;
                C[m]=P<i>;
                goto m4;
            printf("(%c%c)",G[P<i>],G[P[i+1]]);
            i++;
            m++;
            C[m]='(';
            m++;
            C[m]=G[P[i-1]];
            m++;
            C[m]=G[P<i>];
            m++;
            C[m]=')';
    //printf("(%c)%c",G[A<i>],G[A[i+1]]);i++;
        m4:;
        printf("\n");
    //for(i=1;i<=m;i++)printf("%c",B<i>);printf("\n");
    //------------3rd line------------------         printf only
        m=0;
        for(i=1;i<=p;i++){
            n1=T[N[i*3-2]]*16+T[N[i*3-1]]*4+T[N[i*3]];
            n2=T[N[i*3+1]]*16+T[N[i*3+2]]*4+T[N[i*3+3]];
            if(E[n1][n2]<1 || G[P<i>]==G[P[i+1]] /* || i==n */){
                printf("%c%c%c",N[i*3-2],N[i*3-1],N[i*3]);
                goto m33;
            printf("(%c%c%c%c%c%c)",N[i*3-2],N[i*3-1],N[i*3],N[i*3+1],N[i*3+2],N[i*3+3]);
            i++;
        m33:;
        printf("\n");
    //--------------substrings------------
        substrings(20,29);
        substrings(30,39);
        substrings(40,49);
        substrings(50,59);
        substrings(60,69);
        return 0;
    int substrings(int x1,int x2)
        printf("\n");
        printf("lengths %i - %i : \n",x1,x2);
        for(i=1; i<p; i++)
            for (j=i+x1; j<i+x2; j++) {
                if (C<i>>95 && C[j]>95) {   // if lc letter in line2
                    for(x=i;x<=j;x++)
                        printf("%c",C[x]);
                    printf("|");
                    for(x=i;x<=j;x++)
                        if(B[x]>44)         // if not () in line 1
                            printf("%c",B[x]);
                    printf("|");
                    for(x=i;x<=j;x++)
                        if(C[x]>95)         // if lc letter line2
                            printf("%c",C[x]);
                    printf("\n");}
    input file1.txt
    MKKHTDQPIADVQGSPDTRH
    IAIDRVGIKAIRHPVLVADK
    DGGSQHTVAQFNMYVNLPHN
    FKGTHMSRFVEILNSHEREI
    SVESFEEILRSMVSRLESDS
    GHIEMTFPYFVNKSAPISGV
    KSLLDYEVTFIGEIKHGDQY
    GFTMKVIVPVTSLCPCSKKI
    SDYGAHNQRSHVTISVHTNS
    FVWIEDVIRIAEEQASCELF
    GLLKRPDEKYVTEKAYNNPK
    FVEDIVRDVAEILNHDDRID
    AYVVESEBFESIHNHSAYAL
    IERD
    input file2.txt
    atgaaaaaacatactgatcaacctatcgctgatgtgcagggctcaccggataccagacat
    atcgcaattgacagagtcggaatcaaagcgattcgtcacccggttctggtcgccgataag
    gatggtggttcccagcataccgtggcgcaatttaatatgtacgtcaatctgccacataat
    ttcaaagggacgcatatgtcccgttttgtggagatactaaatagccacgaacgtgaaatt
    tcggttgaatcatttgaagaaattttgcgctccatggtcagcaggctggaatcagattcc
    ggccatattgaaatgacttttccctacttcgtcaataaatcagcccctatctcaggtgta
    aaaagcttgctggattatgaggtaacctttatcggcgaaattaaacatggcgatcaatat
    gggtttaccatgaaggtgatcgttcctgttaccagcctgtgcccctgctccaagaaaata
    tccgattacggtgcgcataaccagcgttcacacgtcaccatttctgtacacactaacagc
    ttcgtctggattgaggacgttatcagaattgcggaagaacaggcctcatgcgaactgttc
    ggtctgctgaaacggccggatgaaaaatatgtcacagaaaaggcctataacaatccgaaa
    tttgtcgaagatatcgtccgtgatgtcgccgaaatacttaatcatgatgaccggatagat
    gcctatgttgttgaatcagaaaactttgaatccatacataatcactctgcatacgcactg
    atagagcgcgac
    input file3.txt
    FA tttgcc
    FA ttcgcc
    FA tttgct
    FA ttcgct
    LK ttaaaa
    LK ttgaaa
    LK ttaaag
    LK ttgaag
    LS ctgctc
    LS ctgctt
    LS ctactc
    LS ctactt
    LT ctcacc
    LT ctcact
    LT cttacc
    LT cttact
    LY ctctac
    LY ctctat
    LY ctttac
    LY ctttat
    LG ctcggc
    LG ctcggt
    LG cttggc
    LG cttggt
    IP attccc
    IP attcct
    IP atcccc
    IP atccct
    IP attcca
    IP attccg
    IP atccca
    IP atcccg
    ML atgctc
    ML atgctt
    ML atgctc
    ML atgctt
    VL gtgctg
    VL gtgcta
    VL gtactg
    VL gtacta
    VS gtgtcc
    VS gtatct
    VS gtgtcc
    VS gtatct
    VT gtcacc
    VT gtcact
    VT gttacc
    VT gttact
    VS gtcagc
    VS gtcagt
    VS gttagc
    VS gttagt
    SL tcgctg
    SL tcgcta
    SL tcactg
    SL tcacta
    SP tctcca
    SP tctccg
    SP tcccca
    SP tccccg
    PV ccggtg
    PV ccggta
    PV ccagtg
    PV ccagta
    PG cccggc
    PG cccggt
    PG cctggc
    PG cctggt
    TL acgctg
    TL acgcta
    TL acactg
    TL acacta
    TP acgccg
    TP acgcca
    TP acaccg
    TP acacca
    AL gcttta
    AL gctttg
    AL gcctta
    AL gccttg
    AP gcgccg
    AP gcgcca
    AP gcaccg
    AP gcacca
    AP gctcca
    AP gctccg
    AP gcccca
    AP gccccg
    AN gctaat
    AN gctaac
    AN gccaat
    AN gccaac
    AS gccagc
    AS gccagt
    AS gctagc
    AS gctagt
    YP tatccg
    YP tatcca
    YP tacccg
    YP taccca
    HP catccg
    HP catcca
    HP cacccg
    HP caccca
    QR cagcga
    QR cagcgg
    QR caacga
    QR caacgg
    DL gatttg
    DL gattta
    DL gacttg
    DL gactta
    EN gaaaat
    EN gaaaac
    EN gagaat
    EN gagaac
    EK gaaaaa
    EK gaaaag
    EK gagaaa
    EK gagaag
    ER gagcga
    ER gagcgg
    ER gaacga
    ER gaacgg
    WR tggcga
    WR tggcgg
    RV cgggtg
    RV cgggta
    RV cgagtg
    RV cgagta
    RW cggtgg
    RW cgatgg
    SG agtgga
    SG agtggg
    SG agcgga
    SG agcggg
    GF ggtttt
    GF ggtttc
    GF ggcttt
    GF ggcttc
    GL gggctg
    GL gggcta
    GL ggactg
    GL ggacta
    GY gggtat
    GY gggtac
    GY ggatat
    GY ggatac
    GY ggttat
    GY ggttac
    GY ggctat
    GY ggctac
    GK ggaaaa
    GK ggaaag
    GK gggaaa
    GK gggaag
    GK ggcaag
    GK ggcaaa
    GK ggtaag
    GK ggtaaa
    GW ggctgg
    GW ggttgg
    GR gggcgg
    GR gggcga
    GR ggacgg
    GR ggacga
    GS ggcagc
    GS ggcagt
    GS ggtagc
    GS ggtagt
    output fileout.txt
    MKKHTDQPIADVQGSPDTRHIAIDRVGIKAIR(HP)VLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSM(VS)RLESDSGHIEMTFPYFVNKSAPISGVKSLLDYEVTFIGEIKHGDQYGFTMKVIVP(VT)SLCPCSKKISDYGAHNQRSH(VT)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(EK)YVT(EK)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(EF)ESIHNHSAYALIERD
    MKKHTDQPIADVQGSPDTRHIAIDRVGIKAIR(dp)VLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSM(st)RLESDSGHIEMTFPYFVNKSAPISGVKSLLDYEVTFIGEIKHGDQYGFTMKVIVP(st)SLCPCSKKISDYGAHNQRSH(st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt)YVT(dt)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(dp)ESIHNHSAYALIERD
    atgaaaaaacatactgatcaacctatcgctgatgtgcagggctcaccggataccagacatatcgcaattgacagagtcggaatcaaagcgattcgt(cacccg)gttctggtcgccgataaggatggtggttcccagcataccgtggcgcaatttaatatgtacgtcaatctgccacataatttcaaagggacgcatatgtcccgttttgtggagatactaaatagccacgaacgtgaaatttcggttgaatcatttgaagaaattttgcgctccatg(gtcagc)aggctggaatcagattccggccatattgaaatgacttttccctacttcgtcaataaatcagcccctatctcaggtgtaaaaagcttgctggattatgaggtaacctttatcggcgaaattaaacatggcgatcaatatgggtttaccatgaaggtgatcgttcct(gttacc)agcctgtgcccctgctccaagaaaatatccgattacggtgcgcataaccagcgttcacac(gtcacc)atttctgtacacactaacagcttcgtctggattgaggacgttatcagaattgcggaagaacaggcctcatgcgaactgttcggtctgctgaaacggccggat(gaaaaa)tatgtcaca(gaaaag)gcctataacaatccgaaatttgtcgaagatatcgtccgtgatgtcgccgaaatacttaatcatgatgaccggatagatgcctatgttgttgaatca(gaaaac)tttgaatccatacataatcactctgcatacgcactgatagagcgc
    lengths 20 - 29 :
    st)SLCPCSKKISDYGAHNQRSH(s|VTSLCPCSKKISDYGAHNQRSHV|sts
    st)SLCPCSKKISDYGAHNQRSH(st|VTSLCPCSKKISDYGAHNQRSHVT|stst
    t)SLCPCSKKISDYGAHNQRSH(s|TSLCPCSKKISDYGAHNQRSHV|ts
    t)SLCPCSKKISDYGAHNQRSH(st|TSLCPCSKKISDYGAHNQRSHVT|tst
    lengths 30 - 39 :
    st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(d|VTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDE|std
    t)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(d|TISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDE|td
    t)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt|TISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEK|tdt
    dt)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(d|EKAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESE|dtd
    dt)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(dp|EKAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESEF|dtdp
    t)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(d|KAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESE|td
    t)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(dp|KAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESEF|tdp
    lengths 40 - 49 :
    st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt)YVT(d|VTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEKYVTE|stdtd
    st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt)YVT(dt|VTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEKYVTEK|stdtdt
    t)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt)YVT(d|TISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEKYVTE|tdtd
    t)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt)YVT(dt|TISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEKYVTEK|tdtdt
    dt)YVT(dt)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(d|EKYVTEKAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESE|dtdtd
    dt)YVT(dt)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(dp|EKYVTEKAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESEF|dtdtdp
    t)YVT(dt)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(d|KYVTEKAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESE|tdtd
    t)YVT(dt)AYNNPKFVEDIVRDVAEILNHDDRIDAYVVES(dp|KYVTEKAYNNPKFVEDIVRDVAEILNHDDRIDAYVVESEF|tdtdp
    lengths 50 - 59 :
    t)RLESDSGHIEMTFPYFVNKSAPISGVKSLLDYEVTFIGEIKHGDQYGFTMKVIVP(s|SRLESDSGHIEMTFPYFVNKSAPISGVKSLLDYEVTFIGEIKHGDQYGFTMKVIVPV|ts
    lengths 60 - 69 :
    dp)VLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSM(s|HPVLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSMV|dps
    dp)VLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSM(st|HPVLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSMVS|dpst
    p)VLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSM(s|PVLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSMV|ps
    p)VLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSM(st|PVLVADKDGGSQHTVAQFNMYVNLPHNFKGTHMSRFVEILNSHEREISVESFEEILRSMVS|pst
    st)RLESDSGHIEMTFPYFVNKSAPISGVKSLLDYEVTFIGEIKHGDQYGFTMKVIVP(st|VSRLESDSGHIEMTFPYFVNKSAPISGVKSLLDYEVTFIGEIKHGDQYGFTMKVIVPVT|stst
    st)SLCPCSKKISDYGAHNQRSH(st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(d|VTSLCPCSKKISDYGAHNQRSHVTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDE|ststd
    st)SLCPCSKKISDYGAHNQRSH(st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt|VTSLCPCSKKISDYGAHNQRSHVTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEK|ststdt
    t)SLCPCSKKISDYGAHNQRSH(st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(d|TSLCPCSKKISDYGAHNQRSHVTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDE|tstd
    t)SLCPCSKKISDYGAHNQRSH(st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt|TSLCPCSKKISDYGAHNQRSHVTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEK|tstdt
    t)SLCPCSKKISDYGAHNQRSH(st)ISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPD(dt)YVT(d|TSLCPCSKKISDYGAHNQRSHVTISVHTNSFVWIEDVIRIAEEQASCELFGLLKRPDEKYVTE|tstdtd
    Edited by: David Halitsky on Mar 18, 2008 4:21 AM
    Edited by: David Halitsky on Mar 18, 2008 4:22 AM

  • Regarding string operations

    Hi All,
    i've a string holding the value as given below.
    AA,17,2/19/2003,"9,999.00",USD,00,10,318,"193,275.31"
    by performing some string operations i want the result string in the format as given below:
    AA,17,2/19/2003,"9999.00",USD,00,10,318,"193,275.31"
      i.e., i want to remove all the commas(,)that are included in between a pair of " " only.
    can anyone provide me a sample code for the same

    Hi vijay,
    A bit complex but works for sure, check the following logic,
    REPORT zsritest.
    DATA: gs_string TYPE string.
    gs_string = 'AA,17,2/19/2003,"9,999.00",USD,00,10,318,"193,275.31"'.
    WRITE: / gs_string.
    PERFORM string_trim CHANGING gs_string.
    *       FORM string_trim                                              *
    *  -->  LS_STRING                                                     *
    FORM string_trim CHANGING ls_string.
      DATA: lt_string TYPE string OCCURS 0 WITH HEADER LINE,
            lv_tabix TYPE i,
            lv_start.
      SPLIT gs_string AT '"' INTO TABLE lt_string.
      CHECK sy-subrc EQ 0.
      CLEAR gs_string.
      LOOP AT lt_string.
        lv_tabix = sy-tabix MOD 2.
        IF lv_tabix EQ 0.
          TRANSLATE lt_string USING ', '.
          CONDENSE lt_string NO-GAPS.
        ENDIF.
        IF lv_tabix EQ 0 OR lv_start EQ 'X'.
          CONCATENATE gs_string lt_string INTO gs_string SEPARATED BY '"'.
          IF lv_start EQ 'X'.
            CLEAR lv_start.
          ELSE.
            lv_start = 'X'.
          ENDIF.
        ELSE.
          CONCATENATE gs_string lt_string INTO gs_string.
        ENDIF.
      ENDLOOP.
      IF lv_start EQ 'X'.
        CONCATENATE gs_string '"' INTO gs_string.
      ENDIF.
      WRITE: / gs_string.
    ENDFORM.
    Hope this helps..
    Sri

  • Assignment of components to operations using LSMW

    Hi
    i created routing using LSMW.
    i created all the operations using direct nput methode
    and  material to group assignmebt using batch input methode.
    but i was not able to assign my components of the BOM to my routnig operations.
    How to do this.
    which one is the best and easy way. direct or batch input methode.

    Dear,
    Now I am clear.
    You need to create different 2 BOM and with BOM items, as below,
    example - total requirement of material A is say 10.
    Semi finished Product- X BOM
    BOM item 1 - material A-qty 8
    BOM item 2 - material B-qty -5
    Finished material Y - BOM
    BOM item 1 - semifished material X-qty 10
    BOM item 2 - material C-qty 10
    BOM item 3 - material A-qty 2
    BOM item 4 - material D-qty -2
    You need to create above 2 BOM's if you want to see semifished product into inventory, if not proceed as below
    Finished material Y - BOM
    BOM item 1 - material A-qty 8 assign it to routing operation 10
    BOM item 2 - material B-qty -5 assign it to routing operation 10
    BOM item 2 - material C-qty 10 assign it to routing operation 20
    BOM item 3 - material A-qty 2 assign it to routing operation 30
    BOM item 4 - material D-qty -2 assign it to routing operation 30
    I think this is the only way you can map it.

  • Need help in String operations

    HI all,
    I need help in String operations.I am getting file path of an image as
    c:\test\img\abc.gif"
    I need to convert it in to c:/test/img/abc.gif".
    Can any one suggest the solution for this.
    Thanks,
    Durga.

    [email protected] wrote:
    I used String replace method but I am not able to do it because "/" is a special character."/" is not a special character, "\" is a special character, which needs to be escaped by "\" itself.

  • Use Operator == for String Comparison

    Hi,
    I would like to know more about the impact of using operator == in String Comparison.
    From the reference I get, it state this :
    "Operator (==) compares two object addresses to see whether it refers to the same object."
    I've tested it with 2 codes as below :
    Code 1:
              String Pass1 = "cosmo";
              String Pass2 = "cosmo";          
    if (Pass1==Pass2)
                   System.out.println("1&2:same");
              else
                   System.out.println("1&2:not same");
    Output : 1&2:same
    Code 2:
              String Pass3 = new String("cosmo");
              String Pass4 = new String("cosmo");
              if (Pass3==Pass4)
                   System.out.println("3&4:same");
              else
                   System.out.println("3&4:not same");
    Output : 3&4:not same
    Can anyone kindly explain why is the result so? If operator == compares the addresses, isn't it that the 1st code should also have the output :"1&2:not same".

    Can anyone kindly explain why is the result so?It's an implementation artifact. Strings are pooled internally and because of that any String literal will be represented by exactly one object reference.
    Knowledge of this shouldn't be utilized though. It's safer to follow the basic rule: Use == to compare object references and equals to compare object values, such as String literals.

Maybe you are looking for

  • Is it possible to apply a saved adjustment preset to a mask

    I am photographing an old photo album that has many badly faded photos. In Aperture I want to be able to apply the same adjustments to the photos on each page without changing the page that they are 'stuck' to.  I can do it with the standard presets

  • How do I open a .prn file that only shows in my directory as file?

    I frequently print to file in my HP Photosmart 7260, working in XP.  However, the files should show as .prn files, but are now showing as 'File'.  How do I open them...what driver or application do I need to associate these 'file's in order to open t

  • Connection reset when accessing HTTPS through proxy

    Since upgrading to firefox 27 when trying to access https://www.birtles.org.uk I receive a connection reset or connection interrupted error. I am connecting through a proxy. Firefox 26 works correctly. I have tried on 3 different machines 2 windows a

  • [Solved] Only x11 works with mplayer

    When I try xv or gl I get sound but no picture. Any ideas? My xorg.conf Section "ServerLayout" Identifier "X.org Configured" Screen 0 "aticonfig-Screen[0]" 0 0 InputDevice "Mouse0" "CorePointer" InputDevice "Keyboard0" "CoreKeyboard" EndSection Secti

  • Blank line in Application server file

    Hi, I am uploading datas from 2 internal tables to Application server file(same file). I want a blank like after i finish uploading the first internal table. Need a blank line between two internal table datas. Kindly help me in solving this issue. Re