Quick string question finding if a string contains a character

hello peeps
is there a quick way of checking if a string contains a specific character
e.g.
myString="test:test";
myString.contains(":");
would be true
any ideas on a quick way of doing it

is there a contains() method in 1.4.2? i couldnt see
it in the docsNo there isn't. But the 1.5 has a contains(CharSequence s) method.

Similar Messages

  • Very Quick Newb Question - Converting Float to String

    I created a small program that converts currency for the iPhone. Unfortauntely, I cannot get the UILabel to display my float value. Apparently, NS can though. I found a tutorial that told me simply to use this:
    [label setFloatValue:currency];
    label is the UILabel
    currency is the float value
    When I do that with the iPhone SDK, I get this error:
    warning: 'UILabel' may not respond to '-setFloatValue:'
    messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments.
    Any quick advice would be appreciated!
    Message was edited by: hollafortwodollas

    Simple requirements:
    label.text = [NSString stringWithFormat:@"%f", floatValue];
    More complex example:
    NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
    [formatter setFormatWidth:2];
    [formatter setPaddingCharacter:@"0"];
    [formatter setPaddingPosition:NSNumberFormatterPadBeforePrefix];
    lable.text = [NSString stringWithFormat:@"%@:%@:%@",
    [formatter stringFromNumber:[NSNumber numberWithInt:hours]],
    [formatter stringFromNumber:[NSNumber numberWithInt:minutes]],
    [formatter stringFromNumber:[NSNumber numberWithInt:seconds]]];

  • How to use String Function Find() in a String Value Test?

    Hi,
    i intend to match a substring of the string returned from my UUT when using a String Value Test - VI call.
    I write the returned string to a Local Variable type String (Locals.data_read) and in the Limits Tab - under Expected String Value am using Find(Locals.data_read, "Connected"). When i Check the expression for Errors - i get a warning "Expected String, found Number {64-bit Floating Point}. this value will cause a run-time error."
    What am i missing?
    Thanks
    Kech
    Solved!
    Go to Solution.

    The Find function evaluates to a number:
    Number Find(String string, String stringToSearchFor, Number indexToSearchFrom = 0, Boolean ignoreCase = False, Boolean searchInReverse = False)
    Returns: The zero-based character index, starting at the beginning of the string, of the first character in the substring.  The function returns -1 if it does not find the substring.
    It looks to me like you need to do a numeric step type.  Not a string value test.
    Or you can do something like this:
    Find(Locals.data_read, "Connected") < 0 ? "Doesn't Matter What Is Here" : Locals.data_read
    Hope this helps,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • GREP 'find/change' by list script: find a text string containing different para styles

    Hi
    I'm don't write scripts but do 'enjoy' copying, pasting and changing existing code/txt files.
    I have built a GREP find/change .txt that performs a large number of text edits/changes.
    But I'm left with an issue where I have paragraphs of text (styled earlier in the .txt file) that I'm unable to identify using GREP the usual way. I need to identify text in a particular paragraph style, followed by text in another paragraph style.
    Is it possible with GREP to create a search string to find: text styled with one paragraph style, ending with a paragraph return, and to include in that selection the following paragraph/s styled with another paragraph style?
    MTIA Steve

    seb400 napisał(-a):
    What do you mean by I would mark "changing" in "copying, pasting and changing"?
    Hi Steve,
    I mean I can see a way by modifying some existing code with "find...change" job
    1. set criteria to findGrep
    2. store findGrep() in an array
    3. check each found object if next paragraph matches some new criteria
    4. run changeGrep() if true
    Jarek

  • How can I find out  the strings that will be presented to the UI

    Hi All,
    I am working on a Swing based application (Swing based UI)
    I am requested to do the following on the bytecode of that application:
    I am supposed to find out what strings from within that bytecode will be presented to the UI and what will be used for an internal usage.
    i have no way of running the application to verify that, i can only work on the static bytecode files.
    hard question ha?
    Thanks,
    EItan.

    You would of course have to run it. Either via a VM or recreating a VM yourself.
    As an example of that how would you figure out what string occurs in the following (pseudo) code?
    String msg = (cnt > 1) ? ("files=" + cnt) : ("file=" + cnt);
    if (cnt > 1) DisplayMessage(msg);

  • Finding a Particular string in a Database in the most Optimized way

     Hi All,
              Below is the query to find  a Particular String in the entire database tables,I have a Database of about 500 + tables and each contains many data's .In these tables i want to find a particular
    string but didn't know the column name and table name.so i did as below,but for executing this it almost take 40 - 45 minutes.Is there any other way to Optimize this and make the Query execution Faster.I am copying the code below.Please comment
    DECLARE
        @search_string  VARCHAR(100),
        @table_name     SYSNAME,
        @table_id       INT,
        @column_name    SYSNAME,
        @sql_string     VARCHAR(2000),
     @TableCount    INT,
     @ColumnCount   INT
    SET @search_string = 'Developer'
    DECLARE   @Tables TABLE(Rownumber int identity(1,1),name nvarchar(370),id int)
    DECLARE   @Columns TABLE(Rownumber int identity(1,1),name nvarchar(370),id int)
    INSERT INTO @Tables
    SELECT name, object_id FROM sys.objects WHERE type = 'U'
    SELECT @TableCount=COUNT(1) FROM @Tables
    WHILE (@TableCount >0)
    BEGIN
      SELECT TOP(1)
         @table_name=name
        ,@table_id=id
      FROM  @Tables ORDER BY Rownumber
    INSERT INTO @Columns
    SELECT name,object_id FROM sys.columns WHERE object_id = @table_id AND system_type_id IN (167, 175, 231, 239)
    SELECT @ColumnCount=COUNT(1) FROM @Columns
      WHILE (@ColumnCount >0)
      BEGIN
        SELECT TOP(1)
           @column_name=name
        FROM  @Columns
        WHERE id= @table_id
         ORDER BY Rownumber
         --SET @sql_string = 'IF EXISTS (SELECT 1 FROM ' + @table_name + ' WHERE [' + @column_name + '] LIKE ''%' + @search_string + '%'') PRINT ''' + @table_name + ', ' + @column_name + ''''
          SET @sql_string = 'IF EXISTS (SELECT 1 FROM ' + @table_name + ' WHERE [' + @column_name + '] LIKE ''' + @search_string + '%'') select ''' + @table_name + ''' AS TableName ,  ''' + @column_name
    + ''' AS ColumnName , '''+ @search_string  + ''' As SearchString'
         --select (@sql_string);
          --SET @sql_string = 'IF EXISTS (SELECT 1 FROM ' + @table_name + ' WHERE [' + @column_name + '] = ''' + @search_string + ''') select ''' + @table_name + ''' AS TableName ,  ''' + @column_name
    + ''' AS ColumnName , '''+ @search_string  + ''' As SearchString'
         EXECUTE(@sql_string)
       SET @ColumnCount=@ColumnCount-1
       DELETE FROM @Columns WHERE  Name =   @Column_Name
      END
    SET @TableCount=@TableCount-1
    DELETE FROM @Tables WHERE Name= @Table_Name
    END

    You may also try the below :
    http://gallery.technet.microsoft.com/c0c57332-8624-48c0-b4c3-5b31fe641c58

  • Standard function to find alphabet in string?

    Is there a standard function to find alphabet in string?
    For example, a variable define as char (10),
    I need a function to find out if this variable contains alphabet.
    Any standard function there?

    hiii
    use following code
    data: wa_str(100) type c.
    data: wa_str1 type string.
    data: wa_str2 type string.
    data: wa_str3 type string.
    data: len type i.
    data: ofset type i.
    wa_str = 'ABCD435hjK'.
    len = strlen( wa_str ).
    TRANSLATE wa_str TO UPPER CASE.
    do.
      if ofset = len.
        exit.
      endif.
    if wa_str+ofset(1) co sy-abcde  .
          concatenate wa_str2 wa_str+ofset(1) into wa_str2.
    else.
        concatenate wa_str3 wa_str+ofset(1) into wa_str3.
      endif.
      ofset = ofset + 1.
    enddo.
    write:/ wa_str.
    write:/ 'alphabatic char', 20 wa_str2.
    here TRANSLATE wa_str TO UPPER CASE.
    statement have added .i hope this will solve your problem.
    regards
    twinkal

  • Oracle Spatial function to find nearest line string based on lat/long

    Hi,
    Here is my scenario. I have a table that contains geometries of type line strings (the roadway network). The line geomteries are of type Ohio state plane south (SRID 41104).
    I have a requirement - given a lat/long, find the line string that snaps to that lat/long or the nearest set of line strings within a distance of 0.02 miles.
    This is a typical example of trying to identify a crash location on our roadway network. The crashes being reported to us in lat/long thru the GPS system.
    How can i acheive this through any spatial functions?
    Thanks for the help in advance.
    thanx,
    L.

    Hi L,
    That is not the way I would do it. I would convert my road segments to LRS data, then you can do all queries on the same data.
    Or, if you do not want to modify your original data, create a copy of your road segments with the same ID's and convert the copy into LRS data. If you keep the ID's identical, you can easily use geometry from one and LRS data from the other - as long as you are sure the ID is the same.
    Which will make the workflow a bit easier:
    1. Use SDO_NN to get the closest segments
    2. Use SDO_LRS.PROJECT_PT to get the projected point
    3. Use SDO_LRS.GET_MEASURE to get the measure
    And most of these you can incorporate into one single query. Now I am writing this of the top of my head (It's been a while since I played with LRS). so this has not been tested, but something like this should work (but could probably be greatly improved - it's getting late for me :-) ):
    SELECT
    SDO_LRS.FIND_MEASURE  --//find_measure needs an LRS segment and a point
        SELECT            --//here we select the LRS segment
          r.geometry 
        FROM
          roadsegments r
        WHERE SDO_NN(r.geometry,    --//based on the given GPS point
                     sdo_geometry(2001, 41104, sdo_point_type(lat,lon,NULL), NULL, NULL), 
                     'sdo_num_res=2 distance=0.02 unit=mile') = 'TRUE'
      SDO_LRS.PROJECT_PT  --//We project the point on the LRS segment
          SELECT         --//here we select the LRS segment (again, which could probably be improved!!)
            r.geometry 
          FROM
            roadsegments r
          WHERE SDO_NN(r.geometry,
                       sdo_geometry(2001, 41104, sdo_point_type(lat,lon,NULL), NULL, NULL), 
                       'sdo_num_res=2 distance=0.02 unit=mile') = 'TRUE'
        sdo_geometry(2001, 41104, sdo_point_type(lat,lon,NULL), NULL, NULL) --//The GPS point again
    AS milemarker from dual;So it is not as complicated as you think, it can easily be done with just one query (SQL can do a lot more than you think ;-) ).
    Good luck,
    Stefan

  • Find out varchar2 string NULL columns and Empty columns

    Hi dev's ,
    my requiremnt is to find out the string columns Names of whose storing NULL values and EMPTY strings. for that i had written below code. it's getting some error.
    SET ECHO OFF;
    SET FEEDBACK OFF;
    SET SERVEROUTPUT ON;
    SET VERIFY OFF;
    SET PAGES 0;
    SET HEAD OFF;
    spool D:\stringnull.csv
    DECLARE
      v_tab_indent NUMBER(5);
      v_col_indent NUMBER(5);
      v_val1       VARCHAR2(20);
      v_val2       VARCHAR2(20);
      v_query1     VARCHAR(500);
      v_query2     VARCHAR(500);
    BEGIN
      --DBMS_OUTPUT.ENABLE(100000);
      SELECT MAX(LENGTH(table_name))+1,MAX(LENGTH(column_name))    +1
      INTO v_tab_indent,v_col_indent
      FROM user_tab_columns
      WHERE data_type='VARCHAR2';
    FOR i IN
      (SELECT table_name,
        column_name
      FROM user_tab_columns
      WHERE data_type IN ('NVARCHAR2', 'CHAR', 'NCHAR', 'VARCHAR2')
      ORDER BY table_name,
        column_name
      LOOP
        v_query1:='SELECT NVL('||i.column_name||',0) AS VAL    
                  FROM '||i.table_name||' where '||i.column_name||' IS NULL';
        v_query2:='SELECT '||i.column_name||' AS VAL    
                  FROM '||i.table_name||' where '||i.column_name||'=''''';
        --dbms_output.put_line(v_query1);
       -- dbms_output.put_line(v_query2);
        EXECUTE immediate v_query1 INTO v_val1;
        EXECUTE immediate v_query2 INTO v_val2;
        dbms_output.put_line (rpad(i.table_name,v_tab_indent,' ')||','||rpad(i.column_name,v_col_indent,' ')||' ,'||v_val1||','||v_val2);
      END LOOP;
    END;
    Spool OFF
    Set echo on
    Set feedback onERROR:
    Error report:
    ORA-01403: no data found
    ORA-06512: at line 31
    01403. 00000 -  "no data found"
    *Cause:   
    *Action:
    set feedback onpls help me on this issue..
    Thanks,

    Example:
    SQL> DECLARE
      2    v_val       VARCHAR2(20);
      3    v_query1     VARCHAR(32767);
      4  BEGIN
      5   FOR i IN (SELECT table_name, column_name FROM user_tab_columns
      6             WHERE data_type IN ('NVARCHAR2', 'CHAR', 'NCHAR', 'VARCHAR2')
      7             ORDER BY table_name, column_name
      8            )
      9   LOOP
    10     v_query1 := 'SELECT count(*) FROM '||i.table_name||' where '||i.column_name||' IS NULL';
    11     EXECUTE immediate v_query1 INTO v_val;
    12     dbms_output.put_line(rpad(i.table_name,30,' ')||' : '||rpad(i.column_name,30,' ')||' : '||v_val);
    13   END LOOP;
    14  END;
    15  /
    CHILD_TAB                      : DESCRIPTION                    : 0
    DEPT                           : DNAME                          : 0
    DEPT                           : LOC                            : 0
    EMP                            : ENAME                          : 0
    EMP                            : JOB                            : 0
    MYEMP_OLD                      : ENAME                          : 0
    MYEMP_OLD                      : JOB                            : 0
    MYNULLS                        : ENAME                          : 0
    MYNULLS                        : JOB                            : 4
    PARENT_TAB                     : DESCRIPTION                    : 0
    T                              : CHAR_VALUE                     : 0
    TABLE1                         : COL1_DESC                      : 0
    PL/SQL procedure successfully completed.

  • How to find a specific string in Entire database?

    Well i know this question is posted numerous times here but i m complete noob understanding the solution given on the net.
    Let me introduce the entire scenario .
    We have an application, which keeps on sending emails from an X employees account.
    We are using Oracle 11g as database .But the problem is we don't know which table to search for the value.
    All we have is Database credentials and x employee's name.
    Is there any way we can find out which table contains the name so that we can change it accordingly.
    I m using plsql developer to connect to the database.
    One solution that we got from internet goes as below.
    Ref:
    [http://www.club-oracle.com/articles/oracle-find-all-tables-with-column-value-154/ |http://www.club-oracle.com/articles/oracle-find-all-tables-with-column-value-154/ ]
    As per the solution i had to create a procedure as below .
    create or replace
    procedure find_string( p_str in varchar2 )
    authid current_user
    as
    l_query long;
    l_case long;
    l_runquery boolean;
    l_tname varchar2(30);
    l_cname varchar2(30);
    type rc is ref cursor;
    l_cursor rc;
    begin
    dbms_application_info.set_client_info( '%' || upper(p_str) || '%' );
    for x in (select * from user_tables )
    loop
    l_query := 'select distinct ''' || x.table_name || ''', $$
    from ' || x.table_name || '
    where ( 1=0 ';
    l_runquery := FALSE;
    l_case := NULL;
    for y in ( select *
    from user_tab_columns
    where table_name = x.table_name
    and data_type in ( 'VARCHAR2', 'CHAR' )
    loop
    l_runquery := TRUE;
    l_query := l_query || ' or upper(' || y.column_name ||
    ') like userenv(''client_info'') ';
    l_case := l_case || '||'' ''|| case when upper(' || y.column_name ||
    ') like userenv(''client_info'') then ''' ||
    y.column_name || ''' else NULL end';
    end loop;
    if ( l_runquery )
    then
    l_query := replace( l_query, '$$', substr(l_case,8) ) || ')';
    begin
    open l_cursor for l_query;
    loop
    fetch l_cursor into l_tname, l_cname;
    exit when l_cursor%notfound;
    dbms_output.put_line
    ( 'Found in ' || l_tname || '.' || l_cname );
    end loop;
    close l_cursor;
    end;
    end if;
    end loop;
    end;
    Well i have copied the code to sql window in plsql and executed .But whenever i compile the procedure it says there is an error .
    Not sure what kind of error hidden in the procedure.
    If any 1 has any better idea please share.
    Edited by: Milind on Apr 12, 2012 8:45 PM

    Girish Sharma wrote:
    Milind,
    I am not sure what / which error about your talking, but there is no error/issue at my end when I ran your procedure code :
    1.I just pasted the code in sqlplus window, it showed me Procedure created. message.
    2.I just checked with show errors command, it showed me No errors.
    3.I just tried to run it with :
    SQL> SET SERVEROUTPUT ON;
    SQL> exec find_string('SCOTT');
    Found in EMP.ENAMENo issue error.
    But whenever i compile the procedure it says there is an error .
    SQL> alter procedure find_string compile;
    Procedure altered.
    SQL> exec find_string('SCOTT');
    PL/SQL procedure successfully completed.
    SQL> set serveroutput on;
    SQL> exec find_string('SCOTT');
    Found in EMP.ENAME
    PL/SQL procedure successfully completed.
    SQL>So, there is no error at my end 11.2.0.1 windows box.
    Regards
    Girish Sharma
    Edited by: Girish Sharma on Apr 13, 2012 11:20 AMThanks it worked for me.

  • Use REGEXP_INSTR to find a text string with space(s) in it

    I am trying to use REGEXP_INSTR to find a text string with space(s) in it.
    (This is in a Function.)
    Let's say ParmIn_Look_For has a value of 'black dog'. I want to see if
    ParmIn_Search_This_String has 'black dog' anywhere in it. But it gives an error
    Syntax error on command line.
    If ParmIn_Look_For is just 'black' or 'dog' it works fine.
    Is there some way to put single quotes/double quotes around ParmIn_Look_For so this will
    look for 'black dog' ??
    Also: If I want to use the option of ignoring white space, is the last parm
    'ix' 'i,x' or what ?
    SELECT
    REGEXP_INSTR(ParmIn_Search_This_String,
    '('||ParmIn_Look_For||')+', 1, 1, 0, 'i')
    INTO Position_Found_In_String
    FROM DUAL;
    Thanks, Wayne

    Maybe something like this ?
    test@ORA10G>
    test@ORA10G> with t as (
      2    select 1 as num, 'this sentence has a black dog in it' as str from dual union all
      3    select 2, 'this sentence does not' from dual union all
      4    select 3, 'yet another dog that is black' from dual union all
      5    select 4, 'yet another black dog' from dual union all
      6    select 5, 'black dogs everywhere...' from dual union all
      7    select 6, 'black dog running after me...' from dual union all
      8    select 7, 'i saw a black dog' from dual)
      9  --
    10  select num, str
    11  from t
    12  where regexp_like(str,'black dog');
           NUM STR
             1 this sentence has a black dog in it
             4 yet another black dog
             5 black dogs everywhere...
             6 black dog running after me...
             7 i saw a black dog
    5 rows selected.
    test@ORA10G>
    test@ORA10G>pratz
    Also, 'x' ignores whitespace characters. Link to doc:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/conditions007.htm#i1048942
    Message was edited by:
    pratz

  • Question: Quick Look in Finder; problems with alpha channels

    Hi
    "Quick look" in Finder is great for quick presentations of a folders selected contents but it only works with images that contains no alpha channels or masks. Is there any way to work around this to display say PhotoShop documents with alpha channels? Or any plug-ins/applications that can help?
    thanks.

    This has been broken forever in OS X, and I don't know why, because it used to work just fine. I suspect the engineers did something to QuickTime that causes this problem, but it has been borked for so long I don't remember when the ability to correctly display files went wrong. I just remember that once upon a time all sorts of things from Apple worked correctly in displaying such files, but pretty much nothing does now. This includes the Finder, Preview, QuickLook, and various third-party image browsers that use Apple's own system level image handling abilities, such as VitaminSee or CocoaViewX. When I need to actually see what's there, I browse with Adobe's Bridge.
    Francine
    Francine
    Schwieder

  • Find and replace string in file

    hi,
    i need to find and replace text (string) data in about 100+ files, i've decided to write a small java program to do it but i'm stuck on how to replace.
    here is what i'm heading towards:
    class ReplaceString {
      BufferedReader in;
      BufferedReader os;
      public static void main(String args[]) {
        ReplaceString obj = new ReplaceString();
        obj.replace();
       void replace() {
         try {
           in = new BufferedReader(new FileReader("a.txt");
           os = new BufferdWriter(new FileWriter("a.txt");
           //  read until end of file
           String currentLine = new String();
           while((currenLine=is.readLine()) != null) {
             //  if matching text then replace????
             if(currentLine.equals("Version 001") {
                // how to now replace the Version 001 with Version 002???
         }catch(IOException e) {
            System.out.println(e);
            in.close();
            os.close();
         in.close();
         os.close();
    }the above code i just typed so there might be errors, but looks ok to me, is there any way once i find the string i want to replace, to replace the string with another string. basically i want to replace all occurrences of the text "Version 001" with "Version 002"
    Thank you.

    Is it always true, as in your example, that the replacement is the same length as the existing string? If so, this one's easy.
    Is it also true that you don't need to worry about 16-bit chars? (Again, as in your example.) If you're using just ASCII characters, this gets easier still.
    1) Segregate the file I/O from the search/replace process.
    2) Main becomes:
    readFile();
    replace( "this", "that" );
    writeFile();Use a byte array buffer, defined in your main class. Fill it via the readFile() code. Use a RandomAccessFile, check its length() to allocate your byte array, then do a single read() to fill the buffer.
    A brute force search will certainly work: scan for the first search character, then check the rest for a match, replace if you've got a match and continue scanning. Alternative if your file's aren't too big: create a String from the byte array:
    // buffer is a byte array
    String s = new String( buffer );And use the String.replaceAll() to do the search/replace. Recover the buffer with:
    buffer = string.getBytes();A single write() and close() should handle the remaining work.

  • 12.4 Beta, Error: Could not find a match for std::_Tuple_impl 0, std::string && ::_Tuple_impl(std::tuple std::string &&

    Hi,
    would you guys say code that compiles fine without -std=c++11 should also compile *with* -std=c++11?
    raider@sol112_x86:/tmp $ CC -V
    CC: Sun C++ 5.13 SunOS_i386 Beta2 2014/06/17
    raider@sol112_x86:/tmp $ CC buggy.cc  
    raider@sol112_x86:/tmp $ CC -std=c++11 buggy.cc         
    Error: Could not find a match for std::_Tuple_impl<0, std::string &&>::_Tuple_impl(std::tuple<std::string &&>, std::string ) needed in std::tuple<std::string &&>::tuple<std::string, void>(std::string &&).
    "/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/tuple", line 868:     Where: While instantiating "std::tuple<std::string &&>::tuple<std::string, void>(std::string &&)".
    "/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/tuple", line 868:     Where: Instantiated from std::forward_as_tuple<std::string>(std::string &&).
    "/opt/SolarisStudio12.4-beta_jul14-solaris-x86/lib/compilers/CC-gcc/include/c++/4.8.2/bits/stl_map.h", line 485:     Where: Instantiated from non-template code.
    1 Error(s) detected.
    raider@sol112_x86:/tmp $ cat buggy.cc
    #include <map>
    #include <string>
    typedef std::map<std::string, std::string> StrStrMap;
    int main(void)
        StrStrMap dict;
        dict["bug"] = "feature";
        return 0;

    C++11 is approximately a superset of C++03. If you write in the common subset, the code will compile in any mode. For example, a basic hello-world program
    #include <iostream>
    int main() { std::cout << "Hello, world!\n"; }
    will compile and run as C++98/03, as C++11, as C++14, and I'm sure will also work with the next standard, planned for 2017.
    But if you use syntax or library types and functions that are new in C++11, the code will not compile as C++03.
    In my previous post, I might have sounded too negative about compiling C++03 code in C++11 mode. If you have a C++03 program that is intended to be portable, and that works with different compilers on different platforms, chances are good that it will continue to work in C++11. The chances are very good that only minor modifications will be needed.

  • Flatten to string for sending through TCP/IP contains CRLF characters

    Hi,
    I'm using a 'flatten to string' function to send some data through TCP/IP.
    To minimise delays, I use the CRLF mode so that the receive function returns as soon as it receives a CRLF sequence (termination character).
    I noted that every now and then only part of the data is transmitted because the flattened string itself sometimes (albeit rarely) contains CRLF characters.
    I was wondering if this is correct behaviour, or if I'm missing something.I expected flatten to string to produce pure ASCII strings without special characters.
    Now I first have to scan the string and replace possible CRLF characters by some known series of characters and do the opposite on the receiving side, and hope that this particular sequence never occurs.
    Any comment is appreciated,
    Manu
    Certified LabVIEW Developer (CLD)
    Solved!
    Go to Solution.

    mkdieric wrote:
    Hi,
    thanks for the feedback. I'll use the way you describe, by first sending the number of characters to expect.
    Manu
    Make sure you are consistent with the format for the number of butes. That is, always use an 8, 16 or 32 bit value. Which one you use is up to you and will depend on the size of your data. A 32 bit value is the most common size to use. Anyway what I am basically saying is that if you are inconsistent with what size number you use for the size you will get inconsistent results when you read the data since you will be interpretting the size incorrectly some of the time.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

Maybe you are looking for

  • Write to measurement file at every n iterations

    Hi guys, I would like some help with saving data in labview 2010 SP1 (base development system). I am using a "Write to measurement fil express VI" inside a while loop and the data out from the DAQmn Read is wired to the signal in of the "Write to mea

  • Internet wont connect because of "PPP" setting

    everytime i try to connect to the internet through cable or ethernet a window pops up saying "an incorrect PPP option has been set, please check your settings and try again" i have done everything possible such as system prefrences but nothing seems

  • Grid control 11g - JDK

    I am installing Grid Control on linux 5. one of the steps is to install jdk1.6.0_18 from Oracle jdk-6u18-linux-x64.bin. After I installed it, I checked java version and it looks not correct: >cd jdk1.6.0_18/bin java -versionjava version "1.4.2" gij (

  • SQL*NET V1, V2의 STATUS를 확인하는 방법

    제품 : SQL*NET 작성날짜 : 1995-11-06 * SQL*NET V 1의 적절한 사용 방법 ORASRV의 Permission, Owner 및 Group은 다음과 같이 설정이 되어 있어야 하며 파일의 Size는 Version에 따라 다를 수 있다. -rwsr-xr-x 1 oracle dba 7544832 Jul 21 20:35 oracle -rwsr-xr-x 1 root dba 303104 Jul 5 19:24 orasrv 만일 위와 같

  • [svn:fx-] 21427: Removed flex/sdk/tags/trunk4.5.1 - history not maintained!

    Revision: 21427 Revision: 21427 Author:   [email protected] Date:     2011-06-21 07:16:13 -0700 (Tue, 21 Jun 2011) Log Message: Removed flex/sdk/tags/trunk4.5.1 - history not maintained! Removed Paths:     flex/sdk/tags/trunk4.5.1/