Skip to main content

Posts

Showing posts with the label substring()

How to get desired characters from a String in Siebel eScirpt

substring() Method Extract desired characters from a String (Length Fixed) var SHRs, SMins, TimeStart = "10:30"; SHRs = TimeStart.substring(0,2); //0: Start, 2: End not included SMins = TimeStart.substring(3,5); Results: SHRs: 10 SMins: 30 -- -- -- -- -- -- -- -- -- --  -- -- -- -- -- -- -- -- -- --  -- -- -- -- -- -- -- -- -- -- Syntax stringVar.substring(start[, end]) start: An integer specifying the location of the beginning of the substring to be returned end: An integer one greater than the location of the last character of the substring to be returned Returns A new string, of length end - start, containing the characters that appeared in the positions from start to end - 1 of stringVar. Usage This method returns a portion of stringVar, comprising the characters in stringVar at the positions start through end - 1. The character at the end position is not included in the returned string. If the end parameter is not used, stringVar.substring() returns the characters fr...