Skip to content

VictorSemenchuk/String-SubString

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

String-SubString

Create your own class, input -> should be string, output -> method, should be return array of substrings.
output method -> get all the substrings between the open-close tags: "(", ")", "[", "]", "<", ">" from the string

Details:

  • in your class you can have only one method (output method)
  • instead of additional methods, you should create and use blocks
  • blocks can be as many as you want
  • use MRC
  • your code shouldn't have leak. (Check your code on - Liak. Your code shouldn't have - Leak, use for that suitable tool)

Test data strings:
String:
@"Prime Minister <Narendra Modi> tweeted a <link> to the speech (Human Resource Development Minister Smriti Irani) <made> in the Lok Sabha during the ((debate) on the ongoing JNU row) and the suicide of Dalit scholar Rohith Vemula at the [Hyderabad Central University]."
Result:
-> "Narendra Modi", "link", "Human Resource Development Minister Smriti Irani", "made", "debate", "(debate) on the ongoing JNU row", "Hyderabad Central University"

String:
@"Lorem <(ipsum [dolor <sit] amet), consectetur adipiscing elit>. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet>. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget (nulla. Class aptent <taciti [sociosqu ad] litora torquent per conubia> nostra), per inceptos himenaeos."
Result:
-> "(ipsum [dolor <sit] amet), consectetur adipiscing elit>. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet", "ipsum [dolor <sit] amet", "sit] amet), consectetur adipiscing elit", "dolor <sit", "nulla. Class aptent <taciti [sociosqu ad] litora torquent per conubia> nostra", "taciti [sociosqu ad] litora torquent per conubia", "sociosqu ad"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 100.0%