Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 28 lines (19 sloc) 0.666 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
//
// NSString+Paragraphs.h
// DTRichTextEditor
//
// Created by Oliver Drobnik on 11/11/11.
// Copyright (c) 2011 Cocoanetics. All rights reserved.
//


/**
Methods simplifying dealing with text that is in paragraphs.
The character used to separate paragraphs from each other is '\n'.
*/
@interface NSString (Paragraphs)


/*
Extends the given range such that it contains only full paragraphs.
*/
- (NSRange)rangeOfParagraphsContainingRange:(NSRange)range parBegIndex:(NSUInteger *)parBegIndex parEndIndex:(NSUInteger *)parEndIndex;


- (BOOL)indexIsAtBeginningOfParagraph:(NSUInteger)index;

- (NSRange)rangeOfParagraphAtIndex:(NSUInteger)index;

@end
Something went wrong with that request. Please try again.