dj_angles.caseconverter.boundaries¶
Module Contents¶
- class dj_angles.caseconverter.boundaries.BoundaryHandler¶
Detect and handle boundaries in a string.
The BoundaryHandler is an interface for a CaseConverter instance. It provides methods for detecting a boundary in a string as well as how to handle the boundary.
- abstract is_boundary(pc, c)¶
Determine if we’re on a boundary.
- Parameters:
pc – Previous character
cc – Current character
- Returns:
True if a boundary is found, else false.
- Return type:
boolean
- abstract handle(pc, cc, input_buffer, output_buffer)¶
Handle a detected boundary.
- Parameters:
pc (str) – Previous character
cc (str) – Current character
input_buffer (StringBuffer) – The raw string wrapped in a buffer.
output_buffer (StringBuffer) – The output buffer that stores the new string as it’s constructed.
- class dj_angles.caseconverter.boundaries.OnDelimeterUppercaseNext(delimiters, join_char='')¶
Bases:
BoundaryHandler
Detect and handle boundaries in a string.
The BoundaryHandler is an interface for a CaseConverter instance. It provides methods for detecting a boundary in a string as well as how to handle the boundary.
- is_boundary(pc, c)¶
Determine if we’re on a boundary.
- Parameters:
pc – Previous character
cc – Current character
- Returns:
True if a boundary is found, else false.
- Return type:
boolean
- handle(pc, cc, input_buffer, output_buffer)¶
Handle a detected boundary.
- Parameters:
pc (str) – Previous character
cc (str) – Current character
input_buffer (StringBuffer) – The raw string wrapped in a buffer.
output_buffer (StringBuffer) – The output buffer that stores the new string as it’s constructed.
- class dj_angles.caseconverter.boundaries.OnDelimeterLowercaseNext(delimiters, join_char='')¶
Bases:
BoundaryHandler
Detect and handle boundaries in a string.
The BoundaryHandler is an interface for a CaseConverter instance. It provides methods for detecting a boundary in a string as well as how to handle the boundary.
- is_boundary(pc, c)¶
Determine if we’re on a boundary.
- Parameters:
pc – Previous character
cc – Current character
- Returns:
True if a boundary is found, else false.
- Return type:
boolean
- handle(pc, cc, input_buffer, output_buffer)¶
Handle a detected boundary.
- Parameters:
pc (str) – Previous character
cc (str) – Current character
input_buffer (StringBuffer) – The raw string wrapped in a buffer.
output_buffer (StringBuffer) – The output buffer that stores the new string as it’s constructed.
- class dj_angles.caseconverter.boundaries.OnUpperPrecededByLowerAppendUpper(join_char='')¶
Bases:
BoundaryHandler
Detect and handle boundaries in a string.
The BoundaryHandler is an interface for a CaseConverter instance. It provides methods for detecting a boundary in a string as well as how to handle the boundary.
- is_boundary(pc, c)¶
Determine if we’re on a boundary.
- Parameters:
pc – Previous character
cc – Current character
- Returns:
True if a boundary is found, else false.
- Return type:
boolean
- handle(pc, cc, input_buffer, output_buffer)¶
Handle a detected boundary.
- Parameters:
pc (str) – Previous character
cc (str) – Current character
input_buffer (StringBuffer) – The raw string wrapped in a buffer.
output_buffer (StringBuffer) – The output buffer that stores the new string as it’s constructed.
- class dj_angles.caseconverter.boundaries.OnUpperPrecededByLowerAppendLower(join_char='')¶
Bases:
BoundaryHandler
Detect and handle boundaries in a string.
The BoundaryHandler is an interface for a CaseConverter instance. It provides methods for detecting a boundary in a string as well as how to handle the boundary.
- is_boundary(pc, c)¶
Determine if we’re on a boundary.
- Parameters:
pc – Previous character
cc – Current character
- Returns:
True if a boundary is found, else false.
- Return type:
boolean
- handle(pc, cc, input_buffer, output_buffer)¶
Handle a detected boundary.
- Parameters:
pc (str) – Previous character
cc (str) – Current character
input_buffer (StringBuffer) – The raw string wrapped in a buffer.
output_buffer (StringBuffer) – The output buffer that stores the new string as it’s constructed.
- class dj_angles.caseconverter.boundaries.OnUpperPrecededByUpperAppendJoin(join_char='')¶
Bases:
BoundaryHandler
Detect and handle boundaries in a string.
The BoundaryHandler is an interface for a CaseConverter instance. It provides methods for detecting a boundary in a string as well as how to handle the boundary.
- is_boundary(pc, c)¶
Determine if we’re on a boundary.
- Parameters:
pc – Previous character
cc – Current character
- Returns:
True if a boundary is found, else false.
- Return type:
boolean
- handle(pc, cc, input_buffer, output_buffer)¶
Handle a detected boundary.
- Parameters:
pc (str) – Previous character
cc (str) – Current character
input_buffer (StringBuffer) – The raw string wrapped in a buffer.
output_buffer (StringBuffer) – The output buffer that stores the new string as it’s constructed.
- class dj_angles.caseconverter.boundaries.OnUpperPrecededByUpperAppendCurrent(join_char='')¶
Bases:
BoundaryHandler
Detect and handle boundaries in a string.
The BoundaryHandler is an interface for a CaseConverter instance. It provides methods for detecting a boundary in a string as well as how to handle the boundary.
- is_boundary(pc, c)¶
Determine if we’re on a boundary.
- Parameters:
pc – Previous character
cc – Current character
- Returns:
True if a boundary is found, else false.
- Return type:
boolean
- handle(pc, cc, input_buffer, output_buffer)¶
Handle a detected boundary.
- Parameters:
pc (str) – Previous character
cc (str) – Current character
input_buffer (StringBuffer) – The raw string wrapped in a buffer.
output_buffer (StringBuffer) – The output buffer that stores the new string as it’s constructed.