Simple way to declare a String

I have a String with lot of quote characters and line breaks etc
in java If a string has quotes we use \" , I am wondering if there is any other to way to create a String which has lot of quotes and line breaks etc
in my case I have this string can I just use this as it is
here is my string
<p> <span style="font-size: 7.5pt; font-family: Verdana;">Indiana</span><span style="font-size: 7.5pt; font-family: Verdana;"> concurs with the finding and has taken the following steps: </span></p>
<p><span style="font-size: 7.5pt; font-family: Verdana;">A manual reconciliation process has been instituted.  The current reconciliation process is at the fund center level. There are written procedures for preparing the PSC 272. .  The Financial Accountants reconcile the "expends vs. allots" spreadsheets to balances in FETS on a monthly basis. The DCS Controller or
   FSSA Director of Federal funding reveiw and certify the reports.</span></p>
<p>
<p> <span style="font-size: 7.5pt; font-family: Verdana;">Indiana</span><span style="font-size: 7.5pt; font-family: Verdana;"> has plans for automating this reconcilliation process through the i
   implementation of Peoplesoft (ENCOMPASS Project). Initial estimates projected
   completion of installation by the end of November 2010.  Updated estimates
   project  that implementation would be completed by end of Q2 FY2011.</span></p>
<p>
<p> </p>
</p>
</p>Edited by: Darryl Burke -- broke long lines within code tags

| Moderator action: | Moved from Java Programming. |
| Moderator advice: | Please don't post beginner questions in Java Programming. |
| | Don't post extra long lines within code tags as that breaks the page formatting in some browsers. |
db

Similar Messages

  • Looking for a simple way to convert a string to title case

    New to LiveCycle and Javascript.  Looking for a simple way to convert a string to title case, except acronyms.  Currently using the the following, it converts acronyms to lower case:
    var str  =  this.rawValue;
    var upCase = str.split(" ");
    for(i=0; i < upCase.length; i++) {
    upCase[i] = upCase[i].substr(0,1).toUpperCase() + upCase[i].substr(1).toLowerCase();
    this.rawValue = upCase.join(' ');

    Thanks for the reply.
    Found the following script in a forum, which works fine as a "custom validation script" in the.pdf version of my form.  However, it will not work in LiveCycle?  The problem seems to be with
    "return str.replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g"
    function toTitleCase(str) {
    var smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i;
        return str.replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g, function(match, index, title){
    if (index > 0 && index + match.length !== title.length &&
      match.search(smallWords) > -1 && title.charAt(index - 2) !== ":" &&
    (title.charAt(index + match.length) !== '-' || title.charAt(index - 1) === '-') &&
    title.charAt(index - 1).search(/[^\s-]/) < 0) {
    return match.toLowerCase();
    if (match.substr(1).search(/[A-Z]|\../) > -1) {
      return match;
      return match.charAt(0).toUpperCase() + match.substr(1);
    event.value = toTitleCase(event.value);

  • I'm looking simple way XML-View from a string?

    Hi,
    there is a nice facility to show a XML-Tree in the Microsoft Internet-Explorer from a XML-file on the PC.
    Is there a simple way like this in ABAP?
    My mission is to read a XML-String from a table and to show the XML-Tree in the SAPGUI.
    I found the method CL_XML_DOCUMENT->DISPLAY, but I'm not sure how to export the XML-String to this class/object.
    Best and regards,
    Stefan

    hi,
    you can use
    call method CL_XML_DOCUMENT->display.
    data : l_string type string.
    data :lo_mxml type ref to cl_xml_document,
          m_document  type ref to if_ixml_document,
          l_dom       type ref to if_ixml_element,
          l_ele       type ref to if_ixml_element,
          l_ele1      type ref to if_ixml_element,
          m_doctype   type ref to if_ixml_document_type,
          g_ixml      type ref to if_ixml,
          l_text      type ref to if_ixml_text,
          ls_srctab1  type xstring,
          l_retcode type sysubrc.    "#EC *.
    create object lo_mxml.
    move 'cxml SYSTEM "http://b2b.xxxxx.com/"' to l_string.
    class cl_ixml definition load.
    g_ixml = cl_ixml=>create( ).
    m_document = g_ixml->create_document( ).
      call method m_document->create_document_type
        exporting
           name   = 'cXML'
        receiving
          rval   = m_doctype.
    call method m_document->set_document_type
        exporting
          document_type = m_doctype.
      l_dom = m_document->create_element( name = 'cXML' ).
      l_retcode = m_document->append_child( l_dom ).
      move gw_respond-payload_id to l_string.
    *____setting attribute payload id for cxml tag
      call method l_dom->set_attribute
        exporting
          name    = 'payloadID'
          value   = l_string
         NODE    = LO_NODE
        receiving
          rval = l_retcode.
    call method lo_mxml->display.
    cheers,
    sasi

  • What is the best way to declare field length 500 in internal table?

    Hi all,
    what is the best way to declare field length 500(constant value allways) in internal table?
    I am trying to send data from internal table to file format, and I have a field in internal table with 500 length (constant value always). So how do I can declare and append this field value to table?
    Thanks
    Murali

    Hi.  Please see the following example program, notice how I am filling the field with the constant value.
    report zrich_0001.
    *       CLASS lcl_main DEFINITION
    class lcl_main definition.
      public section.
        types: begin of ttab,
                fld1(500) type c,
               end of ttab.
        data: itab type table of ttab.
        data: xtab type ttab.
        methods: constructor,
                 write_itab.
    endclass.
    *       CLASS lcl_main IMPLEMENTATION
    class lcl_main implementation.
      method constructor.
    <b>
        xtab-fld1 =
          'This is one part of the total string which needs to be really' &
          ' long and this is a constant and we need to move it to a work' &
             ' area and then append it to the internal table which has a' &
              ' field with a length of five hundred characters'.
        append xtab to itab.</b>
      endmethod.
      method write_itab.
        loop at itab into xtab.
          write:/ xtab-fld1.
        endloop.
      endmethod.
    endclass.
    data: o_main type ref to lcl_main.
    start-of-selection.
      create object o_main.
      call method o_main->write_itab.
    Regards,
    Rich Heilman

  • Why isn't there a simpler way to initialize a subclass with its super class

    Let me explain my doubt with an example...
    public class Parent {
    �    public String parent;
    public class Child extends Parent{
    �    public String child;
    I've an instance of Parent p. I want to construct Child c, with the data in p.
    The only way that is provided by Java language seems to be, having a constructor in Child like
    public class Child extends Parent{
    �    public String child;
    �    public Child(Parent p){
    �    �    parent = p.parent;
    �    }
    The problem with this is there is lot of redundant assignment code.
    What I don't understand is why there is not a simpler way of doing this when a subclass is after all super class data + some other data(excuse me for not looking at the bahavior part of it)
    I'm looking for something as simple as Child c = p, which I know is wrong and know the reasons too.
    Yes, we can wrap Child over Parent to do this, but it necessitates repeating all the methods in Parent.
    Why is the language writers didn't provide a simple way of doing this? I should be missing something here...I'm just searching for an explanation. May be I'm asking a dumb question, but this bugs me a lot...
    Regards,
    Kothapalli.

    To answer DrClap, I'm demanding it now :-). Let me
    not suggest something that Mr.Gosling didn't think of;
    he should be having some reasons in not providing it.Because it's essentially impossible in the general case. One of the reasons you may be extending a class is to add new invariants to the superclass.
    eg- extend java.awt.Rectangle by BoundedRectangle - extra invariant that none of its corner points may be less than 0 or more than 100 in any dimension. (The rectangle must be entirely contained in the area (0,0)-(100,100))
    What would happen if you try to create a BoundedRectangle from a rectangle representing (50,50)-(150,150)? Complete invariant breakdown, with no generic way to handle it, or even recognise it.
    Actually, BIJ and sgabie are asking for it. Provide an
    automatic copy constructor. Every object should have
    an implicit copy constructor defined. From any
    subclass, I should be able to invoke
    super(parentClass). From the subclass, we can invoke
    super(parentClass) first and then go on to initialize the
    subclass data.
    I really don't know the implementation issues of this,
    but what I'm looking for is something like this. I'm just
    curious to know the implementation issues.Implementation issue #1: Classes that should not, under any circumstane, be copied.
    * eg 1- Singleton objects. If there's an automatic copy constructor, then multiple singletons can be created, making them essentially useless. This by extension kills the Typesafe Enum pattern also.
    * eg 2- Objects with extra information, such as java.sql.Connection - if you copied this, would the copy be using the same socket connection, or would another connection be required? What happens if opening another connection, and the JDBC driver requires the password to be entered for every new connection? If the wrong password is entered, what happens to the newly creating connection?
    Implementation issue #2: Copying implementation?
    * Already mentioned by RPWithey. The only guaranteed way to perform the copy would be with a shallow copy, which may end up breaking things.
    Why can't you write the copy constructor yourself? If it's a special case, it only has to be done once. If it's a recurring case, you could write a code generation tool to write them for you, along with most of the rest of the class.

  • Easiest way to create a string with a unicode supplimentary character

    In my code I had previously been declaring some strings such as:
    String s = "\u1234";Now I have gotten to a point where I want to use a supplimentary unicode character like this:
    String s = "\u12345";This, however, does not work since Java only allows for characters in the range: 0000 - FFFF.
    I've been reading over this whole codepoint thing in the Character docs but I'm still confused. What's the easiest way to make a string that contains the unicode character U+12345 (just an example number)?

    This article here:
    http://java.sun.com/developer/technicalArticles/Intl/Supplementary/
    says <quote>For text input, the Java 2 SDK provides a code point input method which accepts strings of the form "\Uxxxxxx", where the uppercase "U" indicates that the escape sequence contains six hexadecimal digits, thus allowing for supplementary characters.</quote>
    I believe it is referring to Java 5, although I don't see where it says that. However if you are dealing with supplementary characters it might be a good idea for you to move to Java 5 because of its improved support for them.
    PC&#178;

  • I am going to buy a macbook pro for grade 12, and I need to know wheather I should get a macbook pro or a macbook pro retina. If someone could tell me (in a very simple way) which one is,better for me and why, I would be ever so apprreciative.

    I am going to buy a macbook pro for grade 12, and I need to know wheather I should get a macbook pro or a macbook pro retina. If someone could tell me (in a very simple way) which one is,better for me and why, I would be ever so apprreciative.

    Why do you need a expensive MacBook Pro?
    Your attending high school and unless everyone else is rich also your likely going to be a target by the more poorer students for theft or damage to the machine.
    You could keep it home, but if you need it for class then your exposed again.
    Also at that age your not very careful yet, a MacBook Pro is a expensive and easily damaged machine.
    Unless your made of money and so are others at your school, I would recommned a low profile, just does the job cheap Windows PC.
    If it dies, gets lost, stolen or damaged because of your inexperince handling senstivie electronics then it's no big deal.
    You can buy a Mac later on when your sure you have a need for it, currently there isn't much advantage of owning a Mac compared to a PC, they do just about the same things now, one just looks prettier than the other.
    Since 95% of the world uses Windows PC's your going to have to install Windows on the Mac in order to keep your skills up there or be unemployed, so it's a extra headache and expense.
    good luck

  • Right way to declare field symbols

    i am new to field symbols, pls  help
    i want to know which  is the right way of declaration ?
    types: begin of typ_tab,
               vbeln  type vbap-vbeln,
               posnr type vbap-posnr,
               matnr  type vbap-matnr,
              end of typ_tab.
    data:  itab type standard table of typ_tab,
              wa  type typ_tab.
    field-symbols: <f_t> type standard table, 
                           <f_w> type any,                or      <f_w>  like  line of typ_tab,  ??
                            <f_s> type any.
    select  vbeln posnr  ....... into itab......
    assign  itab to <f_t>.
    assign wa  to <f_w>.
    loop at <f_t> assigning <f_w>.
    assign component 'vbeln' of structure <f_w>  to <f_s>.
    write : / <f_s>.
    endloop.
    OR
    loop at itab assigning <f_w>. 
    write: / <f_w>-vbeln.
    endloop. 
    r these 2 statements correctt ? if so then which one  to use,  pls show with an example. wats the diff btwn above 2  types of  looping statements ?   how to use read statement on this ?

    Hello Saurajit,
    Both the way are correct. And it depends on the requirement, which one to use.
    <f_w> TYPE ty_tab - is TYPED field symbol - if you know TYPE before runtime you can use this. It will just work like a static work area.
    <f_w> TYPE any - is not TYPED and structure of this field symbol is defined during runtime using ASSIGN statement. And fields of the structure is read by ASSIGN COMPONENT <<field name>> statement.

  • I have two apple accounts and one of which has my music on. I would like to move this music to the other account. Is there a simple way of doing this?

    I have two apple accounts and one of which has my music on. I would like to move this music to the other account. Is there a simple way of doing this?

    There is currently no way to merge accounts.  The best option is to pick one, and use it consistantly.
    HTH.

  • I just got new ipad mini....I want to delete all of the music that was synced from my itunes account.  I have went through and deleted some songs one by one but some have a cloud icon with a red arrow on them.....is there a simple way just to delete them?

    I just got new ipad mini....I want to delete all of the music that was synced from my itunes account.  I have went through and deleted some songs one by one but some have a cloud icon with a red arrow on them.....is there a simple way just to delete them?

    Yes there is. Those songs are not actually on your iPad. They are in iCloud ready for download if you choose to do so. If you want to remove them go to Settings>iTunes & App Store>Show All>Music>Off. You can also do this in Settings>Music>Show All Music>Off.

  • Is there a simple way to retrieve the data from a resultset using JavaBean?

    I have a result set from a select * from users where userid = xxx statement. However, at the moment I have had to hard code the remainder of the code to get the data from each column as I need the column name as well as its data.
    I had read somewhere using java beans and reflection it is easier. But i do not know know how.
    Is there a simple way to retrieve the data from a result set ?
    thanks in advance-
    kg

    Well, it is not really simple. But there are Open Source components to simplify it for you. See e.g http://www.must.de/Jacompe.htm - de.must.dataobj.DataObject and its subclasses. Feel free to contact me if you have any questions: [email protected]

  • A simple way in sending message on a large number of contacts?

    Is there a simple way in sending a large number of contacts? I mean, i'll send my message on a group, i.e. "hello" to "classmates" group. I know it is present during ios4 &amp; 5 version? Why now on ios7? How's that? Some of my contacts are changing new numbers so i can't add them to my inbox.

    When a device that is connected to an icloud account has it's contacts deleted, the same contacts at icloud.com are also deleted and then the changes propagate to other computers and devices also connected to the same icloud account.   In other words, the contacts are deleted everywhere.  Also, any iOS backup to icloud does not include contacts or any of the other Apple data, like calendars, reminders, etc.  The only way you can get that data back is if it was on a computer which has been frequently backed up.  You restore the data from the backup.  (This reference to "backup" is a local backup, it has nothing to do with icloud.)

  • Is there a (relatively simple) way to skip tracks with an iPod touch 5th gen using a physical button? I'm aware songs can be skipped on-screen without unlocking the iPod, but I'm looking for a method that doesn't require taking my eyes off the road.

    Is there a (relatively simple) way to skip tracks with an iPod touch 5th gen using a physical button? I'm aware songs can be skipped on-screen without unlocking the iPod, but I'm looking for a method that doesn't require taking my eyes off the road while driving. For that reason, I'm also not interested in adding in headphones or additional devices that have the desired button functions. Going both forward and back would be great but I would be pleased just to have a "sight-free" way to go forward.
    I've seen some mention here and there about ways to maybe change it so the volume buttons change tracks and holding the volume buttons changes the volume... but I don't know what's involved in that or if its even possible/recommended for a new 5th gen iPod. I think its a great device but its sadly lacking in music oriented functions and features... which is disappointing since music is why most people would bother getting one instead of some other "iDevice" :/

    Given that you cannot do what you have asked for, perhaps you simply need to find another solution to your root problem.
    Presumably, you want to skip to the next track because you don't want to hear the current one, and that is because...
    You don't like it.
    You've heard it recently and don't want to hear it now.
    Simply don't want to hear it at this time.
    For problem number 1. Don't put it on the iPod in the first place. (I know, obvious answer!)
    For problem number 2. How about playing from a Smart Playlist (initially created in your iTunes Library) which has only songs you've not played recently?
    For problem number 3. Hhhmmm! Create alternative Playlists for use in the car.
    As for going back to the start of the "now playing" track.... Well, if your Playlist has only songs that you really, really want to hear, then you'll be looking forward to that rather go back to the beginning of the current song.
    I'm not trying to be prescriptive, just giving you food for thought.
    (They are all cheaper options than buying a car which can control the iPod from the steering wheel.)

  • How do I sync music onto old iPod when my music is on iTunes match? I have connected the iPod to my mac but it indicates no music to sink (as my music is in the cloud). I assume there is a simple way to resolve without downloading all music onto my mac?

    How do I sync my music onto an old iPod when my music is located on iTunes match? I have connected the iPod to my mac but it indicates no music to sink (as my music is stored in the cloud). I assume there is a simple way to resolve without downloading all music onto my mac as this would be ridiculous?
    Any halp with this would be excellant.
    Thanks :P

    Hi,
    Your old pod can only sync with music that is physically in your itunes library and on your hard drive. Therefore there is simple way to resolve is to download your music to your hard drive.
    Jim

  • Is there any simple way to close a group of PO's?

    Hello All,
    I was looking an answer for my question on forum but didn't found anything which could help me to solve my issue.
    I would like to close a group of PO's in some period of dates. Is there any simple way to do this? I mean transaction for example, which will let me to choose company number, period of dates  or range of PO numbers and close them by one tick (one action).
    Thank you in advance for any support from your site.
    Regards,
    Kamil

    Kamil,
    Though I have not used this functionality, can you check whether you can use this functionality for mass change?
    Upload and Download of Purchasing Documents
    http://help.sap.com/saphelp_srm70/helpdata/en/09/1f42188473402a890183fd1b7c6082/frameset.htm
    Using this function, you can download purchasing documents as a file to your PC, process them locally, and then upload the changed documents to the SAP Supplier Relationship Management (SAP SRM) system. You can download the following purchasing documents :
    Features:
    The upload/download supports the following functions and possible uses:
    - Cross-Document File Structure
    You can display and process the data in a standard tabular file structure for the documents named above. The file structure assigns a unique technical ID to each data field in a metadata area.
    - Process Document Data Offline and Retain
    You can change or delete existing data, add new data, and transfer all document data, for example, customer fields.
    - Process Large Documents
    This function simplifies the creation of documents with numerous items, and simplifies mass changes to large documents; for example, you can download a document with only one item, and add multiple items to it offline.
    Background processing occurs in the case of very large documents.
    Regards,
    Sandeep

Maybe you are looking for

  • How to Select Database Path via labview

    Hello gurus...........     I am new user in labview. I want read and write in database through labivew . I have done read and write program. Now I want choose database storage path through labview . I tried differnt ways but I couldn't. First read an

  • Recover missing files from FAT32 SD card?

    I got back from a trip and used the SD card slot in my MacBook Pro to import my photos -- first into Aperture, and then using Image Capture to make a second copy as regular image files. Then I used Image Capture to delete the files from the card. So

  • Meeting requests from Mail to iCal - 10.4.6

    Updating to 10.4.6 seems to have broken my ability to import into iCal meeting requests sent from Outlook to an Exchange account in Mail. In 10.4.5 I was able to command-[ and get the meeting.ics attachment which, when doubleclicked, would load the e

  • How to create a slide combining an FLV and jpeg for use in PP?

    I am using the CS4 Master Collection. I want to integrate slides into my DVD curriculum project. I would like to use the flv as the background, put a slightly smaller jpeg (or other graphic) translucent tinted panel on top of it, and then my text. Ca

  • Static NAT with port translation

    Hello All, I have a server running web application on 443 and now I want to publish it on Internet with static nat and just for port 443,  I am thinking that following configuration should be fine, can anyone comment on it.   10.1.1.2:443         10.