When looking for data contained in a character string of 150
bytes, which function is the best to locate that data: scan,
index, or indexc?
Answer Posted / jothi sankar
INDEX is best one. Is for getting location of mentioned
data.
Eg:
str1 = 'Hi i am fine here. how are u there ? .....';
str2 = index(str1,'how'); --> str2 = 20
SCAN is to get a substring upto mentioned character
INDEXC to locate only for mentioned one or more single
character
Is This Answer Correct ? | 5 Yes | 5 No |
Post New Answer View All Answers
Are you involved in writing the inferential analysis plan? Tables specfications?
Name validation tools used in SAS
what are the categories that sas informats are used to the place the data? : Sas-administrator
what cause the "error: connect:" and "error in the libname statement" when there weren't any such problems?
What are types of transport files?
Mention what is PROC in SAS?
Describe crosslist option in tables statement?
AE datasets names? how many types?
what is data access? : Sas-di
What are the difficulties u faced while doing vital signs table or dataset?
what are several options for creating reports in web report studio? : Sas-bi
How substr function works in sas?
what is business intelligence? : Sas-bi
What is program data vector (pdv)?
Differences between where and if statement?