]>
git.saurik.com Git - wxWidgets.git/blob - src/stc/scintilla/src/StyleContext.cxx
1 // Scintilla source code edit control
2 /** @file StyleContext.cxx
3 ** Lexer infrastructure.
5 // Copyright 1998-2004 by Neil Hodgson <neilh@scintilla.org>
6 // This file is in the public domain.
17 #include "StyleContext.h"
20 using namespace Scintilla
;
23 static void getRange(unsigned int start
,
29 while ((i
< end
- start
+ 1) && (i
< len
-1)) {
30 s
[i
] = styler
[start
+ i
];
36 void StyleContext::GetCurrent(char *s
, unsigned int len
) {
37 getRange(styler
.GetStartSegment(), currentPos
- 1, styler
, s
, len
);
40 static void getRangeLowered(unsigned int start
,
46 while ((i
< end
- start
+ 1) && (i
< len
-1)) {
47 s
[i
] = static_cast<char>(tolower(styler
[start
+ i
]));
53 void StyleContext::GetCurrentLowered(char *s
, unsigned int len
) {
54 getRangeLowered(styler
.GetStartSegment(), currentPos
- 1, styler
, s
, len
);