]>
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-2001 by Neil Hodgson <neilh@scintilla.org>
6 // This file is in the public domain.
17 #include "StyleContext.h"
19 static void getRange(unsigned int start
,
25 while ((i
< end
- start
+ 1) && (i
< len
-1)) {
26 s
[i
] = styler
[start
+ i
];
32 void StyleContext::GetCurrent(char *s
, int len
) {
33 getRange(styler
.GetStartSegment(), currentPos
- 1, styler
, s
, len
);
36 static void getRangeLowered(unsigned int start
,
42 while ((i
< end
- start
+ 1) && (i
< len
-1)) {
43 s
[i
] = static_cast<char>(tolower(styler
[start
+ i
]));
49 void StyleContext::GetCurrentLowered(char *s
, int len
) {
50 getRangeLowered(styler
.GetStartSegment(), currentPos
- 1, styler
, s
, len
);