Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 355499

Summary: strlib.characterLen can not be resolved
Product: z_Archived Reporter: Kathy Carroll <carrollk>
Component: EDTAssignee: Project Inbox <edt.compiler-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: pharmon
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Kathy Carroll CLA 2011-08-23 09:35:33 EDT
This EDT code 

    function testCharacterLen()
        data string = "This is some random data";
        size1, size2 int = -33;
        size1 = strLib.characterLen(data);
        Syslib.writeStdout(" size 1 " + size1);
        data += "           ";
        size2 = strlib.characterLen(data);
        Syslib.writeStdout(" size 2 " + size2);
        if (size1 == size2)
            syslib.writestdout(" size1 == size2");
        else
            syslib.writestdout(" size1 != size2 -- blanks are counted");
        end
    end

Gets this validation message:

IWN.VAL.6619.e 11/24 tester - strlib.characterLen cannot be resolved.
Comment 1 Paul Harmon CLA 2011-08-23 10:17:51 EDT
You need to use the Strlib that is in package eglx.rbd. You can use:

eglx.rbd.StrLib.characterLen(data), or simply add an explicit import:

import eglx.rbd.StrLib;

to the file. 



Alternatively, you could use the new string functions to do the same thing without using StrLib:

data.trim().length()
Comment 2 Kathy Carroll CLA 2011-09-19 15:24:29 EDT
This code works as is in build 201109191052
Comment 3 Lisa Lasher CLA 2011-10-11 16:02:08 EDT
Closing this defect.