String Display Format Specifiers?

I am aware that numerics have display format specifiers (as shown in picture), but I'm wondering if there's a similar function for getting the display formats of strings?
I have shown what I want the output to be (although that output was clearly not generated by the code!). So, can I replace the ???'s with some valid format specifiers? 
a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"] {color: black;} a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"]:after {content: '';} .jrd-sig {height: 80px; overflow: visible;} .jrd-sig-deploy {float:left; opacity:0.2;} .jrd-sig-img {float:right; opacity:0.2;} .jrd-sig-img:hover {opacity:0.8;} .jrd-sig-deploy:hover {opacity:0.8;}

Thanks for the reply! Well, yes, I'm aware of one "bad" way this can be accomplished, by using the "Text.Text" property of some dummy string indicators:
Instead, I'm wanting some cleaner syntax. Needing to introduce a dummy indicator just to hijack a property of that object is a bit messy.
Looking at my example, one might argue "Well you only need one dummy string in a For Loop of 4 iterations, setting the Display Style from 0-3. That way you don't need four dummies." Right, but the principle remains... I'm interested in a Format Specifier (or potentially a VI hidden in vi.lib?) that eliminates the need for a dummy indicator.
a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"] {color: black;} a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"]:after {content: '';} .jrd-sig {height: 80px; overflow: visible;} .jrd-sig-deploy {float:left; opacity:0.2;} .jrd-sig-img {float:right; opacity:0.2;} .jrd-sig-img:hover {opacity:0.8;} .jrd-sig-deploy:hover {opacity:0.8;}

Similar Messages

  • Changing hex string display format

    When a string control is in hex display format any data typed is displayed in groups of 2 bytes like AABB CCDD.
    Is there any way to display them in separate group of single bytes like AA BB CC DD?

    Try keeping the discussion in the original thread.

  • String Display Format

    Hai Friends
    In my program i have a String like this 1997-12-25
    I Just want to display this string is like 19971225
    In my program for i have to use it as String not as Date.
    I just want to exclude "-" from my string
    please tell me how can i display like 19971225
    Thanks in advance
    Yours
    Rajesh

    Hi rajeshkumar77!
    String class don't have "delete" method so you must to build a new string resulting from concatenation of tokens, here the numbers.
    eg:
    String source = "1997-12-25";
    int first = source.indexOf('-');
    int last = source.lastIndexOf('-');
    String result = source.substring(0, first) + source.substring(first+1, last) + source.substring(last);
    Note: don't try using replace method, ie: source.replace('-','').
    Best Regards and Success.

  • Format specifiers for spreadsheet to string

    I have used the format specifiers many times before with no problems but this one has stumped me.  I scan a delimited spreadsheet string and convert it to string array.  I then write to a string table.  I would like the format to be X.XXE+N.   I have tried several of the examples to no avail.  One would think that %.2e should do the trick, I sure can't make her work.   All previous posts regarding format specifiers make sense to me, but do not seem to apply to this.  Does the "spreadsheet to string" act differently than other conversions?  Thanks for any help!
    I have included my prototyping trials.  (LV7.1 on XP)
    Attachments:
    format specifiers.vi ‏38 KB

    Thanks Dennis, it is good to have a place to go for answers!
      That is not really what I wanted to hear though, that I would have to change the way I'm doing it, not just change a specifier.  That is going to take at least 1 more function to "wire-up".  Sarcasm is so hard to pen!!
    Gold

  • Format specifiers in format string param.

    I use the format specifier %.8e to format a single precision 2D array into
    an ASCII file, and i wanted to know what other types of format specifiers
    i can use. But the help or the manual does not tell which types are valid.
    Where can i find out? -or can anyone tell me?
    (i use LabVIEW 6.i)
    sincerely
    /lodahl
    % Best regards;Brian Lodahl ; [email protected]
    % http://www.kom.auc.dk/~lodahl ; RISC group 850;Room A6-118;
    % RF Integrated Systems & Circuits (RISC);Aalborg University;
    % Frederik Bajers Vej 7;DK-9220 Aalborg Ø;Denmark
    clc;s=zeros(1,52);c=[+'a':+'z',' '];f=5;a=clock;a=fix(f*a(6));
    while(1)while(1)b=clock;b=fix(f*b(6));if(b~=a)break,end,end,a=b;
    str=('my name is brian and i am just another matlab hacker');
    k=find(s~=s
    tr);n=length(k);if~n,break,end;x=c(ceil(27*rand(1,n)));
    s(k)=x;fprintf('\r%s',s);end;fprintf('\n');clear%;clc;str

    Not being a C programmer (the format specifiers were originally a C tool that LabVIEW inherited), the way that I learned them was to use the Edit Format String dialog that is available by right-clicking on the Format Into String function and the Edit Scan String dialog that is available by right-clicking on the Scan From String function. You can make your formatting choices and see the resulting format specifier.
    But remember... reverse engineering is a violation of section 3 of your LabVIEW software license agreement ;-)
    -Jim

  • Display Format (Video) Frames problem

    The timecode display when set to frames is not working correctly in CS4.
    When you specify Frames instead of timecode it does not change.
    Project Settings>General
    Video | Display Format | Frames
    Can others reproduce this? Seems like a bug to us.
    Link to reference in help:
    http://help.adobe.com/en_US/PremierePro/4.0/WS3E67AF4C-B2A2-4f04-90B4-F8CCFB74B144.html

    >Is there an official problem area that I can report this
    FAQ:How/Where do I report a bug?
    Cheers
    Eddie
    PremiereProPedia   (
    RSS feed)
    - Over 300 frequently answered questions
    - Over 250 free tutorials
    - Maintained by editors like
    you
    Forum FAQ

  • Can I display formated text on a TextArea

    I am developing a chat applet. I want to display texts from chatters in a TextArea with specific colour and font. But TextArea only contain a method AppendText(String) where displaying plain text is only possible. Please anyone help me to display formatted text in a TextArea(or any relavent component).
    Thank you very much.

    You will probably want to look at JEditorPane instead.

  • EXT Display Format LabVIEW bug

    Up for grab, this easy bug (tested in LV 2012.0f3 (32 bit) on Windows XP)
    From a clean start, create a new VI, drop a "Power of x" function and create control for all input and output. Set the representation of the controls/indicators to be "Extended" (I do that for "Y" first and then the other one are automatically created with the corect type). You get this:
    On the FP, enter 300 for Y and 0.01 for X and run the VI (you expect a result of zero).
    Just for fun, set the Display Format of the output (x^y) to Scientific just to check whether there is no hidden digit somewhere.
    Well, surprise!
    Here is what I get first:
    Then, after pressing OK:
    and after Cancel:
    The VI is password protected, so I ended up my little experiment here.
    Note that if you set the Display Format of x^y BEFORE you run the VI, there is no problem at all. However, once you have run it once, the dialog will pop-up at all times. This does NOT prevent you from changing the format, but it is annoying at the very least...
    I tried it with Exponential as well, trying a value of X = -1000 (you expect again a result of zero), to the same effect. It sounds like an underflow of some sort.
    There is no such problems with type Double.
    Comments welcome.

    X. wrote:
    Comments welcome.
    Ignoring for a moment what the actual problem is, I think the sequence of events is fairly simple:
    You open the property page and try to set the format.
    The property VI calls that subVI with the relevant data.
    In the subVI there is a format into string primitive with an unwired error output (or it's unwired downstream).
    There's an error and the VI has auto error handling enabled (or possibly not and this is an internal dialog, since the AEH dialog is different), so it tries to show you where the error happened.
    The VI is locked, so you get a PW dialog.
    Try to take over the world!

  • String regex format

    I am stuck....trying to get the input numbers "1" and "0.23" into a string format result as "1:23",but instead I get a result of "1:0.23". getting rid of the "0." from the fractional number....
    it must be my regex expression, can this be manipulated using regex without using extra functions? appreciate all the help this forum has given.... 

    apok wrote:
    RavensFan wrote:
    I don't see where you are using a regex.  I see you using a format into string.
    Why don't you just multiply the second number by 100 and format that into the string as %0.f;%0.f  ?
    well...the string format is time based. Meaning if the fraction is less than 10, I need the "09" (width of 2) to be inplace and not "9" for the seconds. You made a good point in my use of a format function, when I wanted a regex function?
    I don't know which you actually want, I'm just commenting on what you are actually using versus what you say you are using.
    If the two values are integers, then I would use %d as the format specifier.  If you want it to be a width of 2 padded with zeroes, then it would be %02d.  So I think you actually want "%d:%02d" as your format specifier.  But you can work all that out if you right click the Format into String function and pick Edit Format String.

  • Using %S Format Specifier

    I'm trying to store a null terminated string unicode string into a NSString using initWithFormat, but the string format specifier for 16-bit unicode characters isn't quite working as I expected.
    My code is something like this:
    NSString *nsTmp = [[NSString alloc] initWithFormat:@"Unicode string[%S]", L"Hello"];
    When I print out nsTmp contents, the output is:
    Unicode string[H]
    Thanks for any help in advance.

    Please note the alert/sticky/msg. right at the top of this forum when you come in...it will show you how to properly format your code so it doesn't get mangled by the backend, thus allowing others to take shots at seeing what you've borked, err...sorry... I mean...constructed

  • Why I am I getting an error saying missing Format specifier 's'

    I keep gettting an error when I try to run this program it says that I am missing a format specifier, I chacked and cannot find where it is missing everything is there.
    The error message when ran is:
    Exception in thread "main" java.util.MissingFormatArgumentException: Format specifier 's'
    at java.util.Formatter.format(Formatter.java:2431)
    at java.io.PrintStream.format(PrintStream.java:920)
    at java.io.PrintStream.printf(PrintStream.java821)
    at Inventory2.printString(Inventory2.java:177)
    at Pens.stringPrint(Pens.java:83)
    at PensTest.main(PensTest.java:21)
    The superclass is Inventory2
    //Nicole Hammers
    //Inventory2
    import java.util.Arrays;
    public class Inventory2
      private String productName[];
      private String productNum[];
      private String temp[];
      private double productUnits[];
      private double productPrice[];
      private int b;
      public Inventory2( String itemName[], String itemNum[], String arraytemp[], double amountUnits[], double pricePerUnit[], int a )
        temp = arraytemp;
        sortProductName( itemName );
        sortProductNum( itemNum, arraytemp, itemName  );
        sortProductUnit( amountUnits, arraytemp, itemName );
        sortProductPrice( pricePerUnit, arraytemp, itemName );
        setCounter( a );
      public String[] getTemp( String arraytemp[] )
        temp = arraytemp;
        return temp;
      public String[] getProductName( String itemName[] )
       sortProductName( itemName );   
       return productName;
      public String[] getProductNum( String itemNum[], String arraytemp[], String itemName[] )
       sortProductNum( itemNum, arraytemp, itemName );
       return productNum;
      public double[] getProductPrice( double pricePerUnit[], String arraytemp[], String itemName[] )
       sortProductPrice( pricePerUnit, arraytemp, itemName );
       return productPrice;
      public double[] getProductUnits( double amountUnits[], String arraytemp[], String itemName[] )
       sortProductUnit( amountUnits, arraytemp, itemName );
       return productUnits;
      public String[] sortProductName( String itemName[] )
        productName = itemName;
        Arrays.sort( productName );
        return productName;
      public int setCounter( int a )
        b = a;
       return b;
      public double findIndBaseTot( double price[], double units[], int b )
        double indBase;
        indBase = price[ b ] * units[ b ];
        return indBase;
      public double findAllBase( double productUnits[], double productPrice[] )
         double total = 0;
         for ( int c = 0; c < productUnits.length; c++ )
           total += productUnits[ c ] * productPrice[ c ];
         return total;
      public String[] sortProductNum( String itemNum[], String arraytemp[], String itemName[] )
       temp = getTemp( arraytemp );
       productName = sortProductName( itemName );
        String arraynew[] = new String[4];
        for ( int c = 0; c < productName.length; c++ )
           for ( int d = 0; d < productName.length; d++ )
             if ( productName[ c ].equals( temp[ d ] ) )
                arraynew[ c ] = itemNum[ d ];}    
         productNum = arraynew;
         return productNum;  
      public double[] sortProductUnit( double amountUnits[], String arraytemp[], String itemName[] )
       temp = getTemp( arraytemp );
       productName = sortProductName( itemName );
        double arraynew[] = new double[4];
        for ( int c = 0; c < productName.length; c++ )
           for ( int d = 0; d < productName.length; d++ )
             if ( productName[ c ].equals( temp[ d ] ) )
                arraynew[ c ] = amountUnits[ d ];}
         productUnits = arraynew;
         return productUnits;  
      public double[] sortProductPrice( double pricePerUnit[], String arraytemp[], String itemName[] )//Sorts double type array according to how string type array is sorted.
       temp = getTemp( arraytemp );
       productName = sortProductName( itemName );
        double arraynew[] = new double[4];
        for ( int c = 0; c < productName.length; c++ )
           for ( int d = 0; d < productName.length; d++ )
             if ( productName[ c ].equals( temp[ d ] ) )
                arraynew[ c ] = pricePerUnit[ d ];}
         productPrice = arraynew;
         return productPrice;  
    public void printString( String itemName[], String arraytemp[], String itemNum[], double amountUnits[], double pricePerUnit[], int a )
        productName = getProductName( itemName );
        productNum = getProductNum( itemNum, arraytemp, itemName );
        productUnits = getProductUnits( amountUnits, arraytemp, itemName );
        productPrice = getProductPrice( pricePerUnit, arraytemp, itemName );
        b = setCounter( a );
       System.out.printf( "%s: %17s \n%s: %15s \n%s :%21.2f \n%s: $%18.2f \n%s: $%19.2f \n%s: $%17.2f \n ", "Product Name", productName[ b ], "Product Number", productNum[ b ], "Quantity", productUnits[ b ], "Unit Price", productPrice[ b ], "Base Cost", findIndBaseTot( productPrice, productUnits, b ) );
    }the subclass
    //Subclass Pens
    import java.util.Arrays;
    public class Pens extends Inventory2
      private double refee;
      public Pens( String itemName[], String itemNum[], String arraytemp[], double amountUnits[], double pricePerUnit[], int a )
         super( itemName, itemNum, arraytemp, amountUnits, pricePerUnit, a );
      public int callcounter( int a )
       a = super.setCounter(a);
       return a;
      public double findRestockFee( double price[], double units[], int a )
        double fee;
        fee = super.findIndBaseTot( price, units, a ) * .05;
        return fee;
    public double findIndTot( double price[], double units[], int a )
      double fee;
      double base;
      double indTot;
      fee = super.findIndBaseTot( price, units, a ) * .05;
      base = super.findIndBaseTot( price, units, a );
      indTot = base + fee;
      return indTot;
      public double findTot( double productUnits[], double productPrice[] )
        double fee = 0;  
        double total = 0;
        fee = super.findAllBase( productUnits, productPrice ) * .05;
        total =  super.findAllBase( productUnits, productPrice ) + fee;
        return total;
      public double findTotUnits( double amountUnits[] )
        double total = 0;
        for ( int a = 0; a < amountUnits.length; a++ )
          total += amountUnits[ a ];
        return total;
      public double findAllFee( double amountUnits[], double pricePerUnit[] )
       double fee;
       fee = super.findAllBase( amountUnits, pricePerUnit ) * .05;
       return fee;
      public void stringPrint( String itemName[], String arraytemp[], String itemNum[], double amountUnits[], double pricePerUnit[], int a )
        super.printString( itemName, arraytemp, itemNum, amountUnits, pricePerUnit, a );
      public void print( String itemName[], String arraytemp[], String itemNum[], double amountUnits[], double pricePerUnit[], int a )
        double refee = findRestockFee( pricePerUnit, amountUnits, a );
        double indTot = findIndTot( pricePerUnit, amountUnits, a );
        System.out.printf( "Restocking Fee:$%17.2f \n%s: $%17.2f \n\n", refee, "Total Cost", indTot );
      public void printAll( String itemName[], double amountUnits[], double pricePerUnit[] )      
        System.out.printf( "%s: %17.2f \n%s: $%17.2f \n%s:$ %17.2f \n%s:$ %.2f \n", "Total Units of Pens", findTotUnits( amountUnits ), "Base Cost of Pens", super.findAllBase( amountUnits, pricePerUnit ), "Restock Fee of Pens", findAllFee( amountUnits, pricePerUnit ), "Total Cost of Pens", findTot( amountUnits, pricePerUnit ) );
    }and the the program to make it all work
    //InventoryMain
    public class PensTest
    public static void main( String args[] )
      String itemName[] = { "Fine Point", "Ball Point", "Gell", "Retractable" };
      String arraytemp[] = { "Fine Point", "Ball Point", "Gell", "Retractable" };
      String itemNum[] = { "123456", "234567", "345678", "456789"};
      double amountUnits[] = { 23, 16, 27, 11 };
      double pricePerUnit[] = { 3.99, 1.99, 2.99, 3.49 };
      int a = 0;
      Pens pens = new Pens( itemName, arraytemp, itemNum, amountUnits, pricePerUnit, a );
      for ( a = 0 ; a < itemName.length; a++ )
       pens.callcounter( a );
       pens.stringPrint( itemName, arraytemp, itemNum, amountUnits, pricePerUnit, a );
       pens.print( itemName, arraytemp, itemNum, amountUnits, pricePerUnit, a );
       pens.printAll( itemName, amountUnits, pricePerUnit );
    }I know I'm missing something but I cannot figure out what.

    Maybe something like this to start. - %
    package inventory;
    import java.io.Serializable;
    import java.text.NumberFormat;
    * Product
    * User: Michael
    * Date: Sep 22, 2007
    * Time: 8:39:12 PM
    public class Product implements Serializable, Comparable
       public static final NumberFormat DEFAULT_CURRENCY_FORMAT = NumberFormat.getCurrencyInstance();
       private String name;
       private int item;    
       private double quantity;
       private double price;
       public Product()
          name = "";
          item = 0;
          quantity = 0;
          price = 0.0;
       public Product(String title, int item, double quantity, double price)
          this.name = title;
          this.item = item;
          this.quantity = quantity;
          this.price = price;
       public void setName(String name)
          this.name = name;
       public String getName()
          return name;
       public void setItem(int item)
          this.item = item;
       public int getItem()
          return item;
       public void setQuantity(double quantity)
          this.quantity = quantity;
       public double getQuantity()
          return quantity;
       public void setItemPrice(double price)
          this.price = price;
       public double getItemPrice()
          return price;
       public double calculateValue()
          return price * quantity;
       public int compareTo(Object o)
          Product p = (Product) o;
          return (name.compareTo(p.name));
       public String toString()
          StringBuilder builder = new StringBuilder();
          builder.append("Product{");
          builder.append("item=").append(item);
          builder.append(", name='").append(name).append('\'');
          builder.append(", quantity=").append(quantity);
          builder.append(", price=").append(DEFAULT_CURRENCY_FORMAT.format(price));
          builder.append('}');
          return builder.toString();
    }

  • Data display Format issue.

    Hi ,
    I have the following columns for a single item(SingleVO),
    ItemNo, SugQty, OrdQty, Description,
    I would like to display the data in a table(Normal table or in a Advanced Table) with the
    following format. If there are 50 items, First row should display the First Item's
    itemno, sugqty, orgqty and the secondrow should display the description of the first item and third row should display the Second item's itemno, sugqty, orgqty and the fourthrow should display the description of the second item ....etc.
    Column Names:
    |-------------------------------------------------------|
    |Itemno |     SugQty     |     OrdQty     |     
    |-------------------------------------------------------|     
    |<---------Description--------------------------------> |
    |-------------------------------------------------------|
    Data:
    |-------------------------------------------------------|
    |12344 |     63 |     60     |     
    |-------------------------------------------------------|     
    |<---------Dulux Paint No2----------------------------> |
    |-------------------------------------------------------|
    |12345 | 98     |     100 |     
    |-------------------------------------------------------|     
    |<---------Table set ------------------------> |
    |-------------------------------------------------------|
    I tried with advanced table merging functionality, i couldn't get this type of display.
    Pointers are appreciated.
    (Since we are doing this application for Mobile devices we need to get this kind of display)
    Thanks.
    With Regards,
    Kali.
    OSSI.
    Format change.
    Message was edited by:
    Kalimuthu V
    Message was edited by:
    Kalimuthu V

    Thanks Ranjit,
    We build the table dynamically using rows and columns with the required spans.
    So that we could achieve the same display format.
    Thanks.
    With Regards,
    Kali.
    OSSI.

  • Problem in reading the row values in table display format.

    Hi All
       I created UI asTable display format using three columns( name, email and resume ).
    In this Resume column type is Link to Action. This entire column contains text as Resume  - this element type is Link to action.
    When click on Resume that respective row values I have to capture.
    I have used following code, but It is capturing based on lead selection. ( On the UI, lead selection row is different and clicking on Resume row is different ).
    DATA lo_nd_email TYPE REF TO if_wd_context_node.
      DATA lo_el_email TYPE REF TO if_wd_context_element.
      DATA ls_email TYPE wd_this->element_email.
      DATA lv_email_ref LIKE ls_email-email_ref.
    navigate from <CONTEXT> to <EMAIL> via lead selection
      lo_nd_email = wd_context->get_child_node( name = wd_this->wdctx_email ).
    get element via lead selection
      lo_el_email = lo_nd_email->get_element(  ).
    lo_el_dashboard_1->get_attribute(
        EXPORTING
          name =  `NAEM`
        IMPORTING
          value = lv_name ).
    Please help me on this ..thanks in advance....

    Hi,
       Just declare a variable in the parameters of the method,which u declare for the cell action.
    CONTEXT_ELEMENT      type ref to                      CONTEXT_ELEMENT         as importing paramter
      code:
        context_element->get_static_attributes(
          IMPORTING
            static_attributes = stru_sflight ).
    this will surely solve ur problem
      regards,
    Madhu

  • Date and number display format

    Hello all,
    I am new to Adobe Form, and I am quite unimpressed with how difficult it is to do the most simple things.
    I have managed one way or another to solve all my problems until now, but this one got me stuck.
    I have date and number fields in my form, and here is what I want to do but cannot:
    - I need these fields to be displayed using the defaults date and number settings of the SAP user who is generating the form. This one is really hard for me to figure out.
    - I need some other fields to be displayed in a specific format depending on a variable in the context of my form. I imagine this could be done using scripting, but how to change the display format of a field via scripting?
    Anyone has an idea of how that can be achieved?
    Thank you.

    Hi Thomas,
    For these kind of issues you will get many answers if you search the forum.
    If your requirement is to display the current date in the form, just drag and drop the "Current date" UI element from the Library palette -> Custom.
    If it is to get the date from SAP and display, pass date to the context node and just drag and drop the field into the form from the data view.
    Check the following wiki by Chintan. It explains some common scenarios in javascript.
    [JavaScript Part 1|http://wiki.sdn.sap.com/wiki/display/ABAP/JavaScriptforCommonScenarios-PartI]
    [JavaScript Part 2|http://wiki.sdn.sap.com/wiki/display/ABAP/JavaScriptforCommonScenarios-PartII]
    Use an 'if' condition, check the value and based on the value you can make the field hide/visible in the form.
    Hope this will help.
    Thanks & Regards,
    Sanoosh

  • How can I add three binary numbers and then convert to string (Hex format)?

    Hi All,
    I have my problem "half" resolved, but need some assistance on the final piece.  Overall, I need to take three string values (hex format), convert them to binary, add them and then convert back to a string (hex format).  If that doesn't make sense maybe this will:
    Final Result (My target) = 0xCC
     = 0x03 + 0x01 + 0x04
              = 0x03; 0011b
              = 0x01; 0001b
              = 0x04; 0100b
    For my app, we are dropping "masking" some of the bits so that we get 1 byte:
              = 0x03; 11b
              = 0x01; 001b
              = 0x04; 100b
    So...
    11001100b = 0xCC
    In my VI, I am taking each initial string [0x03,0x01 and 0x04] type casting them to U8.  Next I need to "mask" the binary values as shown above and then add them.  I am not sure how to do this in LV??
    Thanks for the help,
    Bryan

    Hi Bryan,
    there's a conversion palette in the string palette, ever looked at those functions?
    The rest is pure simple math:
    It's the straight-forward way, there are other possibilities too!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

Maybe you are looking for